Page 1 of 1

convert multiple color image into one color

Posted: 2012-03-24T01:44:03-07:00
by ratneshsoni
i want to know that is possible in image magick that convert all image color into one color. Like in one image there is 4 different colors and i want to replace these 4colors in one color like in black.
if it could be possible than how..reply soon

Re: convert multiple color image into one color

Posted: 2012-03-24T09:37:12-07:00
by fmw42
try something like the following.

convert image -fuzz XX% -fill newcolor -opaque oldcolor1 -opaque oldcolor2 -opaque oldcolor3 -opaque oldcolor4 resultimage

The -fuzz XX% is to allow you to change similar colors if your 4 colors are not pure and have some variation. If you can post a link to an example image, then we can probably help better to demonstrate with your image.


see
http://www.imagemagick.org/Usage/color_basics/#replace