possible MPC format bug IM 6.8.3.6
Posted: 2013-03-04T16:57:06-07:00
Mac OSX Snow Leopard
convert -version
Version: ImageMagick 6.8.3-6 2013-02-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib fftw fontconfig freetype gslib jng jp2 jpeg lcms lqr lzma openexr png ps tiff x xml zlib
The following two sets of commands produce quite different results and I believe the issue is with MPC.
The MIFF results match those using PNG. You will note that the first two lines produce the same sets of unique colors and the images look the same for the first line. So it would appear to be something in the last line.
# good
convert rose: -set colorspace RGB -colorspace gray -posterize 6 -colorspace sRGB -write show: 1tmp1.miff
convert 1tmp1.miff -unique-colors txt:- | tail -n +2 | tr -cs ".0-9\n" " " | cut -d' ' -f3
convert 1tmp1.miff -channel rgba -fill white -opaque "gray(170)" -fill none +opaque white show:
# bad
convert rose: -set colorspace RGB -colorspace gray -posterize 6 -colorspace sRGB -write show: 1tmp1.mpc
convert 1tmp1.mpc -unique-colors txt:- | tail -n +2 | tr -cs ".0-9\n" " " | cut -d' ' -f3
convert 1tmp1.mpc -channel rgba -fill white -opaque "gray(170)" -fill none +opaque white show:
convert -version
Version: ImageMagick 6.8.3-6 2013-02-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib fftw fontconfig freetype gslib jng jp2 jpeg lcms lqr lzma openexr png ps tiff x xml zlib
The following two sets of commands produce quite different results and I believe the issue is with MPC.
The MIFF results match those using PNG. You will note that the first two lines produce the same sets of unique colors and the images look the same for the first line. So it would appear to be something in the last line.
# good
convert rose: -set colorspace RGB -colorspace gray -posterize 6 -colorspace sRGB -write show: 1tmp1.miff
convert 1tmp1.miff -unique-colors txt:- | tail -n +2 | tr -cs ".0-9\n" " " | cut -d' ' -f3
convert 1tmp1.miff -channel rgba -fill white -opaque "gray(170)" -fill none +opaque white show:
# bad
convert rose: -set colorspace RGB -colorspace gray -posterize 6 -colorspace sRGB -write show: 1tmp1.mpc
convert 1tmp1.mpc -unique-colors txt:- | tail -n +2 | tr -cs ".0-9\n" " " | cut -d' ' -f3
convert 1tmp1.mpc -channel rgba -fill white -opaque "gray(170)" -fill none +opaque white show: