I was invited to ask this question here by Anthony, and I hope that means it is an interesting question with some good answers.
I am writing concerning this section:
http://www.imagemagick.org/Usage/quantize/#remap
I have been looking into dithering with a very limited palette. I started out being inspired by how you can do this in Photoshop (please watch the video to see the type of effect I am looking to achieve):
http://www.youtube.com/watch?v=USzbw90wOKM
However, I do not want to shell out for a Photoshop license just for this, and Gimp doesn't do this at all well. It would seem that Gimp and ImageMagick use similar (or identical) code for this. The most obvious way to show this is the color green. In the Photoshop example, green is emulated using 50/50 blue and yellow pixels. Using the open source code, you end up with pure yellow.
What I have tried to do is things like this:
Code: Select all
convert myimage.png -dither Riemersma -remap 5colors.png remap_Riemersma_myimage.png
(Version: ImageMagick 6.6.0-4 2011-06-15 Q16 on Ubuntu Linux.)
I started out with photos, but I have used simpler images wih pure colors to try to exaggerate and pinpoint the problems. Feel free to use a simple file with some simple areas of color. Some colors will work relatively fine, but as an example, green will not. Or use a picture with some green in the background.
Now, it is my personal "tragedy" that I can't get this rather obscure thing to work, I can always get my hands on some Photoshop somehow, but there is a more important problem here: If the code can not blend blue and yellow to get green, how can we trust it to do anything properly? There should be considerable room for performance improvement which should be relevant for people using more colors as well.
I am hoping that I have simply done a stupid mistake. That will save me craving Photoshop, at least for this application.