Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
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?
Thanks snibgo. I know but that's not the problem. The image of the text is a full black box (of the image boundaries) at the opacity given with "-evaluate set 40%". The text is completely gone.
text.png contains opaque black text on a transparent black background. If you set the entire image to a certain transparency, the text and background become identical.
Instead of setting an alpha, you could multiply it. Instead of "-evaluate set 40%", use "-evaluate multiply 0.4". That way, the text and background will have different alpha.
Sorry, I don't understand you. What is "normal opacity"?
text.png has text with opacity 1.0 and background opacity 0.0. If you set the image opacity to 40%, both text and background have opacity 0.4. As they are the same colour (black), the text is not visible.
If you multiply opacity by 0.4, the background remains zero (because 0 * 0.4 = 0), but the text becomes 0.4 (because 1 * 0.4 = 0.4).