Mask layers, PNG32 and PNG8

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?".
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Whats the problem? You seem to know what you want to do!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

See IM Examples on using CopyOpacity...
http://www.cit.gu.edu.au/~anthony/graph ... opyopacity

I Quote...
It is vital that the source image does NOT have a matte channel.
That is the input is a mask without any alpha channel.
If it has an alpha channal that is what is copied, resulting in something like
a 'Dst_In' operation (though not as good as transparent areas could become opaque!)

If you plan to use an image with an alpha channal mask, use a proper Duff-Porter Alpah Composition method like 'Dst_In' instead.
http://www.cit.gu.edu.au/~anthony/graph ... se/#dst_in

I'll highlight the quoted section in IM examples. as it is so important.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply