compose Multiply/Screen and clip mask
Posted: 2014-11-12T16:01:48-07:00
Hi,
I've been struggling with this for a while and somehow IM doesn't act as I expect. Hopefully you can guide me to the right direction.
I have an image, which has transparency and I would need to apply a Multiply or Screen compose, but so that the transparent areas don't get affected. However, despite dozens of tries with different approaches I still cannot get my head around this. Here are some test files I use in the following examples: https://www.dropbox.com/sh/d5hlb0mzuvjo ... 5Fbla?dl=0, there are also example files (photoshop-screen.tif, photoshop-multiply.tif) of how the desired effect looks like when created in Photoshop. --> works fine
--> result is an all-white image; shouldn't Screen function exactly same way as Multiply..?
--> Multiply for red area gets applied correctly, but the transparent area of red-trans.tif doesn't leave the person.tif untouched. Also the transparent areas of person.tif end up black
--> similar result than from Multiply above
How could I get closest to the result from Photoshop? What is the best way to use image's transparency as a clip mask to the image itself or is there a different way to approach this problem? I've read through the usage examples, but somehow my IM doesn't seem to act the same way. I'm using IM 6.8.9-7 on OS X 10.9.5.
I appreciate any help or suggestions for further tries.
--patrik
I've been struggling with this for a while and somehow IM doesn't act as I expect. Hopefully you can guide me to the right direction.
I have an image, which has transparency and I would need to apply a Multiply or Screen compose, but so that the transparent areas don't get affected. However, despite dozens of tries with different approaches I still cannot get my head around this. Here are some test files I use in the following examples: https://www.dropbox.com/sh/d5hlb0mzuvjo ... 5Fbla?dl=0, there are also example files (photoshop-screen.tif, photoshop-multiply.tif) of how the desired effect looks like when created in Photoshop.
Code: Select all
convert person.tif red-trans.tif -compose Multiply -composite -flatten out_multiply.jpg
Code: Select all
convert person.tif red-trans.tif -compose Screen -composite -flatten out_screen.jpg
Code: Select all
convert person.tif -mask person.tif -alpha Extract red-trans.tif -compose Multiply -composite out_multiply2.tif
Code: Select all
convert person.tif -mask person.tif -alpha Extract red-trans.tif -compose Screen -composite out_screen2.tif
How could I get closest to the result from Photoshop? What is the best way to use image's transparency as a clip mask to the image itself or is there a different way to approach this problem? I've read through the usage examples, but somehow my IM doesn't seem to act the same way. I'm using IM 6.8.9-7 on OS X 10.9.5.
I appreciate any help or suggestions for further tries.
--patrik