Re: How is GdkPixbuf pixel data stored?



On Thu, Mar 27, 2003 at 03:36:02PM +0800, Christopher Andrew Chenery wrote: 
> I then output the rowstride for the image which was 8 (bytes per row) 
> which prompted me to hack the code to loop 16 times and got:
> 
> 255, 255, 255, 255, 255, 255, 80, 64, 255, 255, 255, 255, 255, 255, 0, 0, 
> rowstride: 8
> 
> My Question is simply why are there two extra bytes per image row, what do 
> they represent and what is a rowstride? - the documentation assumes this 
> knowledge!

Rowstride is simply the width of a row - it's sometimes larger than
the actual width for efficiency reasons (to 4-byte-align the rows for
example). The extra padding bytes (rowstride - width) contain
meaningless data that shouldn't be displayed.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]