标签:style blog os io strong ar 2014 问题
解决问题:将两个图像拼接在一起
前提:需要添加Framework:CoreGraphics.framework
源码:
- (UIImage *) combine:(UIImage*)leftImage :(UIImage*)rightImage { CGFloat width = leftImage.size.width * 2; CGFloat height = leftImage.size.height; CGSize offScreenSize = CGSizeMake(width, height); UIGraphicsBeginImageContext(offScreenSize); CGRect rect = CGRectMake(0, 0, width/2, height); [leftImage drawInRect:rect]; rect.origin.x += width/2; [rightImage drawInRect:rect]; UIImage* imagez = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return imagez; }
iOS 图像处理 - 图像拼接,布布扣,bubuko.com
标签:style blog os io strong ar 2014 问题
原文地址:http://blog.csdn.net/willyang519/article/details/38715945