GNOME Bugzilla – Bug 552678
gdi+ pixbuf loaders fail on "large" images
Last modified: 2009-10-08 12:45:08 UTC
TML's seen the same behavior. If a JPEG gets above (say) 60kb, GDI+ will fail to load the image. I'm attaching a sample project that depends only on glib and gdi+ (loaded at runtime). In the directory, there are 2 images: apple-red.png (which works) testgdi.jpg (which doesn't) Set a breakpoint in gdi_bitmap_to_pixels(). The first call to GetPixel() will fail. I've also tried to use GDI+'s Scan0() method, but to no avail.
Created attachment 118898 [details] test case MSVC project files, sample code, sample images
*** Bug 552951 has been marked as a duplicate of this bug. ***
Created attachment 141367 [details] working version Diff gdi.c between this ZIP and the last to figure out what changes you should make.
Created attachment 144944 [details] [review] Suggested patch Like this, I guess. Hmm, how do I now test this?
(In reply to comment #4) > Created an attachment (id=144944) [details] > Suggested patch > > Like this, I guess. Hmm, how do I now test this? That looks correct to me. You can test it by: 1) building the GDI+ loaders 2) disabling the built-in ones 3) and then writing a little program to load a file into a GdkPixbuf If it works on both images in the attached ZIP, it should be ok to commit the code.
Fix committed and pushed to gtk-2-18 and master. The default in configure.in is still to disable the GDI+ loaders. Will change that later.