Page 1 of 1

Make a color semi-transparent

Posted: 2019-01-15T01:47:20-07:00
by mmcc007
I am trying to overlay image1 over image2. I want to make a color in image1 semi-transparent. So far I have only been able to overlay image1 over image2 using

Code: Select all

composite -gravity north image2.png image1.png image3.png
How do I make a color (grey in this case) in image1 semi-transparent before overlaying it over image2?

I am using:

Code: Select all

Version: ImageMagick 7.0.8-23 Q16 x86_64 2019-01-09 https://imagemagick.org
Thnx

Re: Make a color semi-transparent

Posted: 2019-01-15T07:53:07-07:00
by snibgo
What is your platform? I'll assume Windows BAT. If you use bash or Windows CMD, the syntax is different.

I suggest you use "magick", not "composite". Then you can probably do what you want in a single command, something like:

Code: Select all

magick ^
  ( image1.png -fuzz10%% -fill rgba(50%%,50%%,50%%,0.5) -opaque rgba(50%%,50%%,50%%,1) )
  image2.png ^
  -composite ^
  image3.png

Re: Make a color semi-transparent

Posted: 2019-01-15T17:58:40-07:00
by mmcc007
Thnx for the pointers. I ended up following the pointers from the following:
https://stackoverflow.com/questions/541 ... ransparent