Alexander Eichner wrote: > i have a problem when i load images with a certain size. > Normally the rowstride given with gdk_pixbuf_get_rowstride > is calculated with width of the image multiplied with the number of > channels in the image. > But if i load an RGB Image with for example 314px*240px in size > I get an rowstride of 944 instead of 942.
The rowstride isn't necessarily equal to the width times the number of channels. Very often each row is padded to the next 2-byte or 4-byte boundary, so that the start of each row is 16-bit or 32-bit aligned, making image access faster on some hardware. I'd have to check GDK specifically, but in general it's also possible for the channels of an image to be larger than 8 bits. - Ernie http://home.comcast.net/~erniew _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list