PNG opacity in composition
Posted: 2014-07-21T23:45:16-07:00
I'm creating a composition of images with methods as described here: viewtopic.php?f=1&t=23883. For each layer I create separate image first (according all selected options in app), and then I'm merging those in one image.
The problem is with text images. For a text I create a transparent PNG image with the text using IM. The text needs to be placed over the image at a certain position, but can be transparent at 60% for instance. For normal JPEG's covering each other, the '-alpha on -channel A -evaluate set 60%' rule was working fine. Now for the transparent PNG files I get a 60% transparent black box. What am I missing here?
The problem is with text images. For a text I create a transparent PNG image with the text using IM. The text needs to be placed over the image at a certain position, but can be transparent at 60% for instance. For normal JPEG's covering each other, the '-alpha on -channel A -evaluate set 60%' rule was working fine. Now for the transparent PNG files I get a 60% transparent black box. What am I missing here?
Code: Select all
convert
-size 1457x1445 xc:white -gravity center
( "image1.jpg" -gravity center -virtual-pixel None +distort SRT '0' -geometry -0+0 ) -composite
( "image2.jpg" -gravity center -virtual-pixel None +distort SRT '0' -geometry -0+0 ) -composite
( "text.png" -alpha on -channel a -evaluate set 40% -gravity center -virtual-pixel None +distort SRT '0' -geometry -0+0 ) -composite
-format JPEG "output.jpg"