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 586851 - Transparent BMP files fail to load
Transparent BMP files fail to load
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.6
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-24 14:06 UTC by Dave Hawkes
Modified: 2009-07-22 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example BMP file that causes failure (630.25 KB, image/bmp)
2009-06-24 14:08 UTC, Dave Hawkes
  Details
Patch for release 2.6.6 (1.67 KB, patch)
2009-07-22 10:53 UTC, Massimo
committed Details | Review

Description Dave Hawkes 2009-06-24 14:06:42 UTC
BMP files with an alpha component fail to load and produce an error message.
Comment 1 Dave Hawkes 2009-06-24 14:08:06 UTC
Created attachment 137317 [details]
Example BMP file that causes failure
Comment 2 Martin Nordholts 2009-06-24 15:50:53 UTC
I can confirm this.
Comment 3 Massimo 2009-07-22 10:53:21 UTC
Created attachment 138984 [details] [review]
Patch for release 2.6.6

The attached patch all else failing, before giving 
up, calls 'gdk_pixbuf_new_from_file'.

With a recent version of gtk I'm able to load 
the file attached to comment #1.

Patch  against file 'plug-ins/file-bmp/bmp-read.c'
of release 2.6.6.

HTH
Comment 4 Martin Nordholts 2009-07-22 16:17:12 UTC
Thanks, pushed to master and gimp-2-6 after removing trailing whitespace:

commit 61db48ac746e1b609dae3072d7fc0b702f1ff70d
Author: Massimo Valentini <sixtysix@inwind.it>
Date:   Wed Jul 22 18:17:00 2009 +0200

    Bug 586851 – Transparent BMP files fail to load

    If everything else fails, use gdk_pixbuf_new_from_file().

 plug-ins/file-bmp/bmp-read.c |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)
Comment 5 Tor Lillqvist 2009-07-22 16:22:56 UTC
If gdk_pixbuf_new_from_file() is used as a fallback anyway, why not then call *only* that in the plug-in? That way the code for reading BMP would be in just one place. Hmm, except that there presumably are some kinds of BMPs that the plug-in's own code reads differently from gdk-pixbuf's code.
Comment 6 Martin Nordholts 2009-07-22 16:24:53 UTC
That would be too high risk for 2.6

I would welcome that change in the master branch though