Page 1 of 1

Masking: A Seemingly Trivial Question

Posted: 2012-05-10T15:36:08-07:00
by theblackswan
New to the IM world, tried several hours replicating a simple ImageMagick command in PerlMagick, but to no avail, and am posting to get some help. I could not figure out the right set of params for Composite.

Code: Select all

convert orange1.jpg violet1.jpg text.jpg -composite compose-masked-1.png
The mask, text.jpg is a generated grayscale image, so Duff-Porter methods did not take the transparency into account- maybe I am also doing that wrong.

Also, my final aim is to preserve the opacity of text.jpg, make a mask from orange1.jpg, and then do several other things with it. If there is a way to do that without resorting to manipulating pixels, please guide me out!

And thanks to the wonderful people who created and maintain IM. I come from ML/NLP world, had no experience in Image Processing before, and IM alone will be able to handle all of my needs.

Re: Masking: A Seemingly Trivial Question

Posted: 2012-05-10T23:57:35-07:00
by anthony
Yes you are using JPEG which has no alpha channel.. add a -alpha set before the -composite