【发布时间】:2011-08-21 00:07:49
【问题描述】:
我想通过单击按钮将多个图像合并为一个图像>我的问题是,如果用户在 tableview 中触摸图像,则相应的图像必须与下一页中的主图像合并..如何我们可以这样做吗?
这是页面中的主图!this the the uppercloth
我必须修复漫画中的上布
【问题讨论】:
标签: ios image cocoa-touch
我想通过单击按钮将多个图像合并为一个图像>我的问题是,如果用户在 tableview 中触摸图像,则相应的图像必须与下一页中的主图像合并..如何我们可以这样做吗?
这是页面中的主图!this the the uppercloth
我必须修复漫画中的上布
【问题讨论】:
标签: ios image cocoa-touch
使用 UIGraphicsBeginImageContext,然后调用图像的 drawAtPoint 方法,然后使用 UIGraphicsGetImageFromCurrentImageContext 获取合并后的图像。像这样的东西(没有检查,只是从内存中写的..可能有语法错误..纠正自己..)
UIGraphicsBeginImageContext(yourFirstImage.size);
[yourFirstImage drawAtPoint:CGPointMake(0,0)];
[yourSecondImage drawAtPoint:CGPointMake(0,0)];
UIImage *mergedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
【讨论】: