标签: java processing
Processsing中是否有可用于添加图像并将图像叠加到另一张图像上的功能?
因此,例如,我可以将2个图像加载到2个单独的PImage中,如下所示:
PImage image1 = loadImage("imagefile1.jpg"); PImage image2 = loadImage(imagefile2.jpg");
现在,如何将image2添加到image1,以便image2显示在image1之上,然后保存整个已编辑的image1作为一个新形象?
image2
image1
答案 0 :(得分:0)
当然有!只需copy:
image1.copy(image2, 0, 0, image2.width, image2.height, 0, 0, image2.width, image2.height); image1.save("copied.jpg");
或者如果你想要blend他们......
image1.blend(image2, 0, 0, image2.width, image2.height, 0, 0, image2.width, image2.height, ADD); image1.save("blended.jpg");