Page 1 of 1
Color Overlay
Posted: 2006-04-12T15:14:10-07:00
by riegel
Does anyone know how to duplicate the "Color Overlay" feature in photoshop. Basically it replaces all pixels with a specific color.
Thanks for any help
Terry Riegel
Posted: 2006-04-12T16:51:33-07:00
by magick
To replace all pixels in an image with a specific color, use this command:
- convert image.jpg -fill red -draw 'color 0,0 reset' image.png
Posted: 2006-04-12T19:15:35-07:00
by riegel
That replaces the transparent areas also, I just want to replace any pixel that has a color similar to Photoshops "Color Overlay" command
Posted: 2006-04-13T14:29:13-07:00
by riegel
magick wrote:
To replace all pixels in an image with a specific color, use this command:
- convert image.jpg -fill red -draw 'color 0,0 reset' image.png
The above command has the effect of creating a red box of the same dimensions as the original graphic. I am looking for something that will replace all exisitng pixels with red. In other words I don't want red in the transparent areas.
Posted: 2006-04-13T16:07:15-07:00
by magick
Ok, try this:
- convert image.jpg \( -clone 0 -fill red -draw "color 0,0 reset" \) -compose atop -composite image.png
This command will only work with a modern version of ImageMagick. If this is still not what you want, let us know.
Posted: 2006-04-18T13:08:40-07:00
by riegel
magick wrote:
convert image.jpg \( -clone 0 -fill red -draw "color 0,0 reset" \) -compose atop -composite image.png
Thanks, it works awesome.
Re: Color Overlay
Posted: 2012-04-25T01:03:30-07:00
by xcart
It does not work for me. Is it working with current ImageMagick version 6.7.6?
It generated red square and fill background too but transparent background should be kept.
Re: Color Overlay
Posted: 2012-04-26T22:35:24-07:00
by anthony
Instead of 'reset' you should be using 'replace' or all of that color (like -opaque operator) or 'floodfill' to replace colors next to the seed point.
See Color replacement
http://www.imagemagick.org/Usage/color_basics/#replace
And Draw Color primative
http://www.imagemagick.org/Usage/draw/#color