After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552678 - gdi+ pixbuf loaders fail on "large" images
gdi+ pixbuf loaders fail on "large" images
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
: 552951 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-17 18:08 UTC by Dominic Lachowicz
Modified: 2009-10-08 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (87.19 KB, application/x-zip-compressed)
2008-09-17 18:09 UTC, Dominic Lachowicz
  Details
working version (82.21 KB, application/x-zip-compressed)
2009-08-21 19:38 UTC, Dominic Lachowicz
  Details
Suggested patch (4.69 KB, patch)
2009-10-07 10:49 UTC, Tor Lillqvist
none Details | Review

Description Dominic Lachowicz 2008-09-17 18:08:59 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.
Comment 1 Dominic Lachowicz 2008-09-17 18:09:49 UTC
Created attachment 118898 [details]
test case

MSVC project files, sample code, sample images
Comment 2 Tor Lillqvist 2008-09-20 10:29:32 UTC
*** Bug 552951 has been marked as a duplicate of this bug. ***
Comment 3 Dominic Lachowicz 2009-08-21 19:38:01 UTC
Created attachment 141367 [details]
working version

Diff gdi.c between this ZIP and the last to figure out what changes you should make.
Comment 4 Tor Lillqvist 2009-10-07 10:49:47 UTC
Created attachment 144944 [details] [review]
Suggested patch

Like this, I guess. Hmm, how do I now test this?
Comment 5 Dominic Lachowicz 2009-10-07 15:22:53 UTC
(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.
Comment 6 Tor Lillqvist 2009-10-08 12:45:08 UTC
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.