Full Subject: Change all pixels of a specific color to a semi-transparent color
I have an image (obviously) and I want to change all of the white rgba pixels in the image to a semi-transparent rgba color (i.e. 210,210,210,0.5).
How can I accomplish this?
Thanks in advance!
Chad
Change all pixels of a specific color to a semi-transparent
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Change all pixels of a specific color to a semi-transpar
convert image -channel rgba -alpha on -fill "rgba(210,210,210,0.5)" -opaque white result
be sure to use png or gif or tiff as jpg does not support transparency
Presumably your image does not have transparency to begin with. If otherwise, then the approach needs to change for the transparency existing on the white parts.
be sure to use png or gif or tiff as jpg does not support transparency
Presumably your image does not have transparency to begin with. If otherwise, then the approach needs to change for the transparency existing on the white parts.