Page 1 of 1

Are -posterize and -colors channel sensitive?

Posted: 2012-12-10T19:08:37-07:00
by fmw42
IM 6.8.0.8 Q16 Mac OSX Snow Leopard.

I am trying to reduce colors of the L channel in HCL using either -posterize or -colors.

I am getting quite different results from these two commands. I suspect that -posterize and -colors are not channel sensitive. Or there is a bug? Or have I missed something in my commands? If the former, can they both be made channel sensitive, please, when convenient? It is not urgent. Thanks

Image

This works fine:

convert zelda3.png -colorspace HCL -separate +channel \
\( -clone 2 +dither -posterize 6 \) \
-delete 2 -set colorspace HCL -combine -colorspace sRGB show:

This does not match and does not even appear to process correctly if channel sensitive:

convert zelda3.png -colorspace HCL -channel B +dither -posterize 6 +channel -colorspace sRGB show:


Also the same kind of issue with -colors

convert zelda3.png -colorspace HCL -separate +channel \
\( -clone 2 +dither -colors 6 \) \
-delete 2 -set colorspace HCL -combine -colorspace sRGB show:

convert zelda3.png -colorspace HCL -channel B +dither -colors 6 +channel -colorspace sRGB show:

Re: Are -posterize and -colors channel sensitive?

Posted: 2013-01-10T21:29:12-07:00
by anthony
Colors is not channel dependant. And Posterize generates a linear array of colors that should then be able to be dithered So perhaps it could be channel dependant at least for the generation of colors.

Of greater concern is that dither does not use all the colors that are given to it, or has than now been fixed?