Multiplying on compositing with alpha in background
Posted: 2011-10-21T07:17:41-07:00
Hey dear supporters,
first of all: thanks a lot for this great software and for your restless assistace. It gives nearly limitless graphical programming options to the world.
My version: ImageMagick 6.6.1-5 2010-05-01 Q16
But I'm developing a software based on ImageMagick so I can't really be shure about the version used.
I'm trying to multiply an overlay with shadow information into a background image containing an alpha channel.
first attempt:convert overlay_garbage.png overlay_lighting.png -compose Multiply -composite overlay_result.png
The result in Imagemagick seems to remove alpha information of the background and replaces it with image information of the overlay.
I tried a lot with alpha information, the best result was with inserting alpha information later again but the result isn't usable in this case.
second attempt: convert \( overlay_garbage.png overlay_lighting.png -compose Multiply -composite \) overlay_garbage.png -compose DstIn -composite overlay_result.png
The result of this attempt "washes out" the pixels with less opacity and white overlay because of the color information added in the first step (better seen on another black layer)
I know how boring it feels to get compared to other software but just as an example what I want to achieve please have a look at what Gimp is doing while simply multiplying the overlay on the background with alpha information. When I add a third layer underneath the background I get the output I'm looking for. (The third layer is just for imagination and not part of the overall rendering process)
So it seems I don't understand the behaviour of alpha channels in ImageMagick at all :/ I would really appreciate some hints that head me in the right direction.
Thanks a lot in advance, cheers, markus.
first of all: thanks a lot for this great software and for your restless assistace. It gives nearly limitless graphical programming options to the world.
My version: ImageMagick 6.6.1-5 2010-05-01 Q16
But I'm developing a software based on ImageMagick so I can't really be shure about the version used.
I'm trying to multiply an overlay with shadow information into a background image containing an alpha channel.
first attempt:convert overlay_garbage.png overlay_lighting.png -compose Multiply -composite overlay_result.png
The result in Imagemagick seems to remove alpha information of the background and replaces it with image information of the overlay.
I tried a lot with alpha information, the best result was with inserting alpha information later again but the result isn't usable in this case.
second attempt: convert \( overlay_garbage.png overlay_lighting.png -compose Multiply -composite \) overlay_garbage.png -compose DstIn -composite overlay_result.png
The result of this attempt "washes out" the pixels with less opacity and white overlay because of the color information added in the first step (better seen on another black layer)
I know how boring it feels to get compared to other software but just as an example what I want to achieve please have a look at what Gimp is doing while simply multiplying the overlay on the background with alpha information. When I add a third layer underneath the background I get the output I'm looking for. (The third layer is just for imagination and not part of the overall rendering process)
So it seems I don't understand the behaviour of alpha channels in ImageMagick at all :/ I would really appreciate some hints that head me in the right direction.
Thanks a lot in advance, cheers, markus.