Hi.
Just a small feature request. Kind of niche use case so let me know if this is out-of-scope for Pillow.
Basically I'd like to save a PNG with bits=4 but with exactly 5 entries in the palette array. Currently, Pillow writes a 16-entry PLTE chunk regardless of the actual number of palette entries.
Could we imagine a small option such as palette_padding=False (default to True for retro-compatibility) to disable padding?
Note that this is permitted by the PNG specs and that Pillow reads these image well.
Hi.
Just a small feature request. Kind of niche use case so let me know if this is out-of-scope for Pillow.
Basically I'd like to save a PNG with
bits=4but with exactly 5 entries in the palette array. Currently, Pillow writes a 16-entryPLTEchunk regardless of the actual number of palette entries.Could we imagine a small option such as
palette_padding=False(default toTruefor retro-compatibility) to disable padding?Note that this is permitted by the PNG specs and that Pillow reads these image well.