Color Removal

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hsadek2011
Posts: 3
Joined: 2011-02-15T14:02:44-07:00
Authentication code: 8675308

Color Removal

Post by hsadek2011 »

Hi,
I wonder if there's a way so that I can remove certain colors from some number of pictures at once, like white and absolute blue using a command line scripting operation.
Thanks,
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color Removal

Post by fmw42 »

what do you mean by remove? make transparent?

If all the pictures are in one directory, you can use mogrify. If you only have a few images, you can use convert and list all the images and apply the same commands to remove those colors.

If you want to make transparent an exact color, use

-transparent somecolor

if you want to make transparent some color and those colors very near, then use

-fuzz XX% -transparent somecolor

where XX% is the percent difference in color that you want to include and make transparent


see

http://www.imagemagick.org/Usage/basics/#mogrify
http://www.imagemagick.org/Usage/color_basics/#replace
Post Reply