Posted: 2006-11-12T20:14:17-07:00
Well -scale 100% is a no-op. that is it doesn nothing!
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:will remove all perfect green colors from the image.
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.
From this you can pull out a column or IM parsable colors, append a "-transparent" to the front of each color and add the result to a command line to convert those colors to transparency.
It is scripty, requiring multiple commands and output re-processing, but it should work for a small number of unique colors.
If anyone has a better idea, or a way to replace one colormap for another, PLEASE let us know.
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.