ImageMagick / ImageMagick6

🧙‍♂️ ImageMagick 6
https://legacy.imagemagick.org
Other
196 stars 81 forks source link

Magic++: Expanding the color map destroys it #44

Closed HorstBaerbel closed 19 hours ago

HorstBaerbel commented 5 years ago

Using Magic++ 6.9.7.4+dfsg-16ubuntu6.4 amd64 on Ubuntu 18.04.2. When I load a 8-bit paletted PNG, resize the color map and write the file again the palette is destroyed. This is due to AcquireImageColormap() being called internally. The color map should at least retain the minimum possible number or colors. Example code:

Image img;
img.read("in.png"); //<-- 8bit paletted file
img.colorMapSize(img.colorMapSize() + 1);
img.write("out.png");
HorstBaerbel commented 4 years ago

Is this a bug, or am I "doing it wrong"? I am simply trying to add a color to the color map.