masking image

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
webshaker
Posts: 16
Joined: 2007-07-25T15:42:25-07:00

masking image

Post by webshaker »

Hi

I have an jpg image (i.jpg).
I have a second png image (m.png) with only and alpha channel (created with photoshop).

I'd like to add the color channel of my jpg to my png.

I hope that
composite i.jpg m.png d.png should work but it don't.

d.png is the same as i.jpg (no alpha channel)

Could somebody help me please?
Thank's Etienne
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: masking image

Post by el_supremo »

Try this:

Code: Select all

convert i.jpg ( m.png -negate ) +matte -compose copyopacity -composite d.png
Pete
Post Reply