Page 1 of 1

Help needed creating Alpha PNG image

Posted: 2009-04-16T09:57:19-07:00
by mickeyportilla
I am using magick++/c++. I have a PNG32 image that I would like to load and create a new image from that will only contain the alpha channel as the image. The new image would ideally be saved a PNG8. Basically instead of using a PNG32 I would be using two images, a JPG for the color image and a PNG8 as the alpha. Any help appreciated, thanks!

Re: Help needed creating Alpha PNG image

Posted: 2009-04-16T10:22:44-07:00
by magick
Use image.channel( AlphaChannel ) to extract the alpha channel and then image.write() to write it as PNG8.

Re: Help needed creating Alpha PNG image

Posted: 2009-04-16T11:50:31-07:00
by mickeyportilla
That worked perfectly, thank you!