Re: How is GdkPixbuf pixel data stored?



Hi,

Christopher Andrew Chenery <cheneryc cs curtin edu au> writes:

> 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 the number of bytes you need to skip to get to the same
column in the next row. The reason that this is not equal to width *
bpp is simply that memory is most efficiently accessed on word
boundaries. For this reason, GdkPixbuf (and other libraries that deal
with pixel graphics), assure that pixel rows start on word
boundaries. The extra two bytes you see are just for padding and you
should never access them.


Salut, Sven



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