Missing the firt layer while using writeImages()

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
yujincheng08
Posts: 3
Joined: 2013-11-07T07:59:41-07:00
Authentication code: 6789

Missing the firt layer while using writeImages()

Post by yujincheng08 »

Here my code:

Code: Select all

			images.push_back(Image("1.png"));
			images.push_back(Image("2.png"));
			images.push_back(Image("3.png"));
			for (auto i = images.begin(); i < images.end(); i++)
			{
				i->label(i->fileName());
				i->magick("PSD");
				i->backgroundColor("none");
				i->colorspaceType(RGBColorspace);
				i->alphaChannel(ActivateAlphaChannel);
				i->mergeLayers(MosaicLayer);
			}
			writeImages(images.begin(), images.end(), "out.psd", true);
"1.png"is lost.
If I use modify to writeImages(images.begin(), images.begin()+1, "out.psd", true); "1.png" is not missing.
Post Reply