【发布时间】:2013-09-27 05:52:22
【问题描述】:
我想合并两个图像(查看截图 1),并更改为单个图像。但我无法合并 3D 变换图像。
如果我合并图像意味着它会变成原始大小(查看屏幕截图 2)。
我如何合并图像或截取屏幕截图以获得 3D 转换图像视图。
我使用以下代码合并图像,
-(UIImage *)captureView:(UIImageView *)imageView
{
//Merge the two images.
UIGraphicsBeginImageContext(backgroundImageView.frame.size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
[imageView.layer renderInContext:ctx];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
【问题讨论】:
标签: iphone ios xcode uiimageview screenshot