Unable to preserve binary transparency with PNG8

Juraj Komacka <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CACUFmXsZcc+iQhojWV=zf-6icAwJSi+qQrTqrWFErVNYFkmMgg@mail.gmail.com>
Hi,

having an image with binary transparency I am unable to convert it to PNG8
without loosing it.

First I create testing image
# gm convert -size 256x256 xc:green -transparent green -fill blue -draw
"rectangle 66,50 144,150" test.png

then I convert it
# gm convert test.png PNG8:indexed.png
It fails with "gm convert: Invalid background palette index (indexed.png)"

I have tried various -colors values (2, 3, 254, 255, 256), running with
-debug coders reveals warning from libpng

  16:01:00 0:01 0.030u 28295 png.c/PNGWarningHandler/1065/Coder:
      libpng-1.2.50 warning: Invalid background palette index

Am I missing something?

Using ImageMagick 6.8.9-9 Q16, everything works as expected (same commands,
just remove gm from them)

Tested on Debian Wheezy (1.3.16-1.1) and Jessie (1.3.20-3+deb8u1, 1.13.22 -
built from source)

Thanks for any help pointing me in right direction.
Juraj

------------------------------------------------------------------------------

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.