0

I'm working with the Magick++ API and I'm trying to figure out how do I read in one image, and perform two different kinds of effects and save each out into a different image. Right now what I'm doing is reading in an image and warp/distort it along a circle path and saving that new one (image-warped.ext). This works great. My next step now is to also create another image that's a mirror flop. So read in a 400x400 pixel image, flop it along the right edge so I end up with an image that's 800x400 and then save that out.

How do I do that with the same original image object I just read in? I can't imaging having to go back and reread the original image again, after all it's already in memory. Or am I mistaken?

Thanks!

4

2 回答 2

0

发现我可以简单地通过它:

Magick::Image originalFile;
originalFile.read("file.png");

Magick::Image clonedFile = originalFile;

此时我有 originalFile 和 clonedFile。我可以分别对待每一个。

来源:http ://www.imagemagick.org/Magick++/Image.html - 第二个例子。

于 2014-04-04T08:26:04.570 回答
0

我认为您正在寻找 CloneImage() 函数。读入,克隆它,处理一个并输出,然后处理克隆。

这也是命令行工具的工作方式……见这里

于 2014-04-03T22:10:17.450 回答