[Image-SIG] [BUG] PNG writer using 'bits' stores palette too big

Wolfgang Fellger wolfgangfellger at web.de
Sun Jan 28 21:24:04 CET 2007

Sorry if this has been reported before, I was too lazy looking through all the archives.

When using the PNG writer with e.g. bits=4 it still stores a palette with full 256 entries into the resulting file.
This is not only a waste of space, it also makes e.g. GIMP silently convert it to a 8-bit palette image (and store it as such on save).

Solution: PNG writer should clip the palette as appropriate.

Keep up the good work!
Wolfgang Fellger

More information about the Image-SIG mailing list