Page 1 of 1

Noobie question regarding CopyPixels

Posted: 2018-04-05T18:22:15-07:00
by JayE
I'm trying to copy a PNG image (with alpha) onto a transparent/blank background PNG image, but the PNG image I am copying to the background is not displayed, probably because the background image is transparent.

How do I get CopyPixels to ignore the background image?
I tried lots of the Channels.xxx options but nothing seems to work the way I want it to.

// Background
bgndImage= new MagickImage(bytes);

// Copy image onto background
imgAdd = new MagickImage(bytes);
bgndImage.CopyPixels(imgAdd, new MagickGeometry(imgAdd.Width, imgAdd.Height), point.X, point.Y, Channels.RGB);

Re: Noobie question regarding CopyPixels

Posted: 2018-04-08T12:43:04-07:00
by dlemstra
I wonder why you are using the CopyPixels method. I suspect you will need to use one of the Composite overloads to accomplish your goal.

Re: Noobie question regarding CopyPixels

Posted: 2018-04-10T18:03:30-07:00
by JayE
Composite overloads?
How do I use those?