Page 1 of 1

mosaicImages with transparent background problem

Posted: 2013-10-17T06:35:30-07:00
by RayR

I am having problem to create a flatten image with transparent background when using either flattenImages or mosaicImages function.

Code: Select all

std::list<Magick::Image> images;

Magick::Image resultImage;
mosaicImages(&resultImage, images.begin(), images.end());

note: image1 is not fully contained image2, so the resultImage should have some transparent pixels.

my problem is whenever I use mosaicImages(), all i get is the flatten image with white background. I also tried use

Code: Select all

mosaicImages(&resultImage, images.begin(), images.end());
but i still get the white background.

Is there any way i can set the background color?

Thanks advance for help

Re: mosaicImages with transparent background problem

Posted: 2013-11-05T14:39:07-07:00
by dlemstra
You should change the background color of your first image.