GNOME Bugzilla – Bug 573695
1-bit white background saved as PBM becomes all black
Last modified: 2009-03-12 22:22:25 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.
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.
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.
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.
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.