Hi there,
this is day three of my odyssey, so please forgive my question. I normally find what I'm looking for by searching for it, not by asking for help.
Problem: I've got a picture to fill. Exactly: An area that is defined by being NOT transparent and being completely enclosed by a fully transparent area.
I know ImageMagick can do that. This this is amazing! But.... how? *sigh*
Kind regards,
Peter
Q: Fill everything except of transparency area
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Q: Fill everything except of transparency area
First line is just to create a test image from the logo: IM internal image:
convert logo: -resize 50% -transparent white logo2t.png
Now color the non-transparent parts red:
convert logo2t.png \
-channel rgb -fill red -colorize 100% +channel \
logo2t_red2.png
or
convert logo2t.png \
\( -clone 0 -alpha off -fill red -colorize 100% \) \
\( -clone 0 -alpha extract \) \
-delete 0 -compose copy_opacity -composite \
logo2t_red.png
convert logo: -resize 50% -transparent white logo2t.png
Now color the non-transparent parts red:
convert logo2t.png \
-channel rgb -fill red -colorize 100% +channel \
logo2t_red2.png
or
convert logo2t.png \
\( -clone 0 -alpha off -fill red -colorize 100% \) \
\( -clone 0 -alpha extract \) \
-delete 0 -compose copy_opacity -composite \
logo2t_red.png