Page 1 of 1

-colors does not work with RGBA PNG

Posted: 2011-03-22T09:32:47-07:00
by Juce
sphere.png:
Image

convert sphere.png -colors 50 spherecolors50.png
Image

convert sphere.png PNG8:spherepng8.png
Image

This works:
convert sphere.png spheregif.gif
Image

ImageMagick 6.6.8-6 2011-03-21 Q16
Windows XP 32-bit

Re: -colors does not work with RGBA PNG

Posted: 2011-03-22T10:58:14-07:00
by glennrp
For the first conversion I'm seeing the same result whether the output is .png or .txt so I don't think it's a PNG bug.

For the second conversion, it is to be expected that the quantization is lousy because we are simply dropping
the low 5 bits of the Red and Green samples and the low 6 bits of blue.

Converting spheregif.gif to spheregif.png looks pretty good, exactly the same as spheregif.gif but smaller file size.