Posterise of a gradient does not produce a uniform distribution of colors.
Code: Select all
convert -size 20x640 gradient: -rotate 90 gradient.png
convert gradient.png +dither -posterize 5 posterize_gradient.gif
The colors generated...
Code: Select all
convert posterize_gradient.gif -unique-colors txt:
Which is a uniform selection (quantization) of 5 colors (which is what posterize should do, but the matching of 'nearest' color to this color map is failing -- BADLY# ImageMagick pixel enumeration: 5,1,255,rgb
0,0: ( 0, 0, 0) #000000 black
1,0: ( 64, 64, 64) #404040 grey25
2,0: (127,127,127) #7F7F7F grey50
3,0: (191,191,191) #BFBFBF grey75
4,0: (255,255,255) #FFFFFF white
This is the clearest indication of a problem I and others have reported a number of times.
Something is not correct with 'dither' image color to the color map.