As for your problem. I currently know of no way to remove the colors specified by an image from another image. It is not a common thing to do.
You can however re-map specific colors Eg:
Code: Select all
convert input.png -transparency green output.png
For imperfect or 'near' matchs you can add a 'fuzz factor'. See IM examples...
http://www.cit.gu.edu.au/~anthony/graph ... olor/#fuzz
However you can generate a command to do this type of thing! the 'txt:' image format will list the colors in the map into a format that IM can handle.
Code: Select all
convert colormap.png -unique-colors txt:-
Code: Select all
convert colormap.png -unique-colors txt:- | \
sed '1d; s/.*#/#/; s/ .*//; s/^/-transparent /' > remove_colors_args
convert input.png `cat remove_colors_args` output.png
If anyone has a better idea, or a way to replace one colormap for another, PLEASE let us know.