composite command line masking not working

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite command line masking not working

Post by fmw42 »

The mask image probably cannot have alpha data. But since all the information in your mask is in the alpha channel, then you can just extract the alpha channel and use it as a mask.

convert background overlay \( mask -alpha extract \) -composite result

note if on windows, leave off the two \

If you get the wrong masking direction, then add -negate after -alpha extract.

This would go a lot easier if you would provide links to your three images!
Post Reply