结合图像 [英] Combining images

查看:108
本文介绍了结合图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将拾取的图像放在另一个图像的顶部,这样我拍摄的图像就会放在我在Photoshop中制作的某种帧中。合并图像后,我想将其保存到磁盘。

I want to place the picked image on top of another image, so that my picked image will be placed in some sort of frame I made in Photoshop. After combining the images I want to save it to the disk.

有谁知道怎么做,或者可能有示例链接?

Does anyone know how to do it, or maybe have a link to examples?

推荐答案

你可以将两个图像叠加在一起,首先添加帧图像,然后用照片添加图像...

You can just layer the two images on top of each other, first add the frame image, then add the image with the photo...

下载示例代码

假设您的2张图片已经正确调整大小以适应其他图像,代码将在视图控制器中

Assuming your 2 images are already sized correctly to fit one on top of t he other, this code would be in a view controller

UIImageView *frame=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Frame.png"]];
UIImageView *pic=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pic.png"]];
frame.center=[self.view center];
pic.center=[self.view center];
[self.view addSubview:frame];
[self.view addSubview:pic];

在这里,内存管理尚未写入..

here it is, memory managment has not been written in..

这篇关于结合图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆