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 171646 - Bmp plugin incorrectly reports "invalid compression" when bitdepth is invalid
Bmp plugin incorrectly reports "invalid compression" when bitdepth is invalid
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Low trivial
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-03-25 22:09 UTC by David Costanzo
Modified: 2008-01-15 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bitdepth-zero.bmp -- a bitmap with claimed bitdepth of 0 (9.44 KB, image/bmp)
2005-03-25 22:11 UTC, David Costanzo
  Details
Proposed fix (363 bytes, patch)
2005-03-25 22:17 UTC, David Costanzo
committed Details | Review

Description David Costanzo 2005-03-25 22:09:20 UTC
Please describe the problem:
When you try to load a (corrupt) bmp with an invalid bitdepth (but a valid
compression field), the bmp plugin incorrectly reports that the bitmap's
compression is invalid.

The bug is in ReadImage() in plug-ins/bmp/bmpread.c.  The erroroneous text is in
the default case of the first switch(bpp) statement.  It's on line 477 in
gimp-2.2.4.

This looks like a simple copy & paste error.


Steps to reproduce:
1. Try to load bitdepth-zero.bmp (it has a bitdepth of 0)


Actual results:
The GIMP reports that it can't load the image because "Unrecognized or invalid
BMP compression format."

Expected results:
The GIMP reports that it can't load the image because "Unsupported or invalid
bitdepth."

Does this happen every time?
Yes

Other information:
Comment 1 David Costanzo 2005-03-25 22:11:14 UTC
Created attachment 39259 [details]
bitdepth-zero.bmp -- a bitmap with claimed bitdepth of 0

The bitmap is otherwise a valid 1bpp bitmap.
Comment 2 David Costanzo 2005-03-25 22:17:00 UTC
Created attachment 39260 [details] [review]
Proposed fix
Comment 3 Sven Neumann 2005-03-25 22:17:10 UTC
That would be a string change. We can only do that in the HEAD branch. It's not
worth breaking the string freeze for such a trivial (almost artificial) problem.
Comment 4 Sven Neumann 2005-03-25 22:19:34 UTC
2005-03-25  Sven Neumann  <sven@gimp.org>

	* plug-ins/bmp/bmpread.c: better error message (bug #171646).