Color reduction doesn't work well with alpha PNGs
Posted: 2013-04-05T09:02:19-07:00
Consider this sample 32-bit alpha PNG image:
When converted to 256 colors, ImageMagick 6.3 does a fantastic job:
ImageMagick 6.3 Output:
However, the image looks considerably worse when I use ImageMagick 6.8:
ImageMagick 6.8 Output:
As you can see, the IM 6.8 image has strange artifacts and what appear to be palette errors.
Here is another example from ImageMagick's own Quantize Page (http://www.imagemagick.org/Usage/quantize/):
Source Image:
ImageMagick 6.3 Output:
ImageMagick 6.8 Output:
As you can see, the ImageMagick 6.3 version looks considerably better.
Did something change in the ImageMagick color reduction algorithms?
I am using:
Version: ImageMagick 6.8.4-6 2013-04-04 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib freetype jng jpeg lcms png tiff xml zlib
OS: Linux 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux (64-bit CentOS 6.2)
- Joe
When converted to 256 colors, ImageMagick 6.3 does a fantastic job:
Code: Select all
convert alpha-source.png -dither None -colors 256 alpha-256-im63.png
However, the image looks considerably worse when I use ImageMagick 6.8:
Code: Select all
convert alpha-source.png -dither None -colors 256 alpha-256-im68.png
As you can see, the IM 6.8 image has strange artifacts and what appear to be palette errors.
Here is another example from ImageMagick's own Quantize Page (http://www.imagemagick.org/Usage/quantize/):
Source Image:
Code: Select all
convert alpha_gradient.png -dither None -colors 256 alpha_gradient-256-im63.png
Code: Select all
convert alpha_gradient.png -dither None -colors 256 alpha_gradient-256-im68.png
As you can see, the ImageMagick 6.3 version looks considerably better.
Did something change in the ImageMagick color reduction algorithms?
I am using:
Version: ImageMagick 6.8.4-6 2013-04-04 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib freetype jng jpeg lcms png tiff xml zlib
OS: Linux 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux (64-bit CentOS 6.2)
- Joe