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 573695 - 1-bit white background saved as PBM becomes all black
1-bit white background saved as PBM becomes all black
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.5
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-03-02 00:18 UTC by Ari Pollak
Modified: 2009-03-12 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ari Pollak 2009-03-02 00:18:39 UTC
From Debian bug report http://bugs.debian.org/517502: 

In certain situations, GIMP inverts colors while saving a file in the PBM format.

How to reproduce:

1. Create a new image with white background.

2. Convert image to 1-bit black-and-white palette.

3. Save as PBM (raw).

4. If you reopen the image, it's all black rather than all white.
Comment 1 Sven Neumann 2009-03-05 14:14:08 UTC
Now fixed in both branches:

2009-03-05  Sven Neumann  <sven@gimp.org>

	Bug 573695 – 1-bit white background saved as PBM becomes all black

	* plug-ins/common/file-pnm.c: need to handle the special case that
	the image colormap has only one entry.

Note that this really only affected completely blank white images.
Comment 2 Jakub Wilk 2009-03-12 10:51:12 UTC
Sorry to say that, but I could trigger the bug with non-trivial (e.g. 256x256 white with a single black pixel) images, too. So perhaps the fix is not sufficient.
Comment 3 Sven Neumann 2009-03-12 11:29:43 UTC
You are right, there's a second problem here. The plug-in makes assumptions about the order of black and white in the colormap. Reopening.
Comment 4 Sven Neumann 2009-03-12 22:22:25 UTC
Now fixed in both branches:

2009-03-12  Sven Neumann  <sven@gimp.org>

	Bug 573695 – 1-bit white background saved as PBM becomes all black

	* plug-ins/common/file-pnm.c: look at the colormap and test which
	of the two colors is black and which is white.