Hi,
I am playing around with a program that stores images as binary strings in a sqlite3 db. I load the images using gtk.gdk.pixbuf_new_from_data().
This works flawlessly for 95% of all images loaded. However, some render skewed as i calculate an incorrect rowstride.
Above is an example of a 50px by 50px RGB jpeg, which i have calculated a rowstride of 150 (50 wide x 3 deep (RGB)).
Now when i load the same image as a pixbuf using gtk.gdk.pixbuf_new_from_file(), pixbuf.get_rowstride() reports a rowstride of 152. Now i cannot understand how this can be, as 152 divided by 50 does not produce a whole number.
gtk.gdk.pixbuf_new_from_data() will not allow a rowstride of 152 int his case as it reports that the amount of pixel data is less than required by the paramaters.
Anyone have any expierience with this issue?
Bookmarks