Page 1 of 1

Masking issue with 7.0.5

Posted: 2017-05-25T10:23:32-07:00
by chaoscarnage
Just updated from 6.
We use this method of applying masks to images.

Code: Select all

convert blank.png img.png mask.png -composite img.png 
In 6 this worked great, in 7 the mask doesn't seem to be applied at all and the png also loses all transparency.
Is there a command that I need to add in 7 to get the default behavior from 6?

Re: Masking issue with 7.0.5

Posted: 2017-05-25T11:43:21-07:00
by magick
IMv7 has a reverse alpha from IMv6. Try

Code: Select all

convert blank.png img.png \( mask.png -negate \) -composite img.png

Re: Masking issue with 7.0.5

Posted: 2017-05-25T12:25:58-07:00
by chaoscarnage
Looks like that did the trick! Thanks a ton!

Re: Masking issue with 7.0.5

Posted: 2017-05-26T12:24:34-07:00
by chaoscarnage
I apologize but I appear to still have issues with partial masks.

When I apply a mask that's half black and half white It masks as you'd expect but the white part becomes entirely filled with black.

Any way to stop the white pixels from being filled in?

Re: Masking issue with 7.0.5

Posted: 2017-05-26T12:31:45-07:00
by chaoscarnage
using -read-mask and -compose CopyOpacity seemed to help.