关于UIImage的图片处理(截图,合并图片)
来源:互联网 发布:工商网络监管工作总结 编辑:程序博客网 时间:2024/06/02 11:35
合并图片
- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {
CGSize size= CGSizeMake( image1.size.width,(int)v.scrollView.contentSize.height % (int)self.view.frame.size.height+image2.size.height);
UIGraphicsBeginImageContext(size);
// Draw image1
[image2 drawInRect:CGRectMake(0, (int)v.scrollView.contentSize.height % (int)self.view.frame.size.height, image2.size.width, image2.size.height)];
// Draw image2
[image1 drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];
UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resultingImage;
}
截图
- (UIImage *)imageFromView: (UIView *) theView atFrame:(CGRect)r
{
UIGraphicsBeginImageContext(theView.frame.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
UIRectClip(r);
[theView.layer renderInContext:context];
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return theImage;//[self getImageAreaFromImage:theImage atFrame:r];
}
- (UIImage *)imageFromView: (UIScrollView*) theView
{
UIGraphicsBeginImageContext(theView.contentSize);
CGContextRef context = UIGraphicsGetCurrentContext();
[theView.layer renderInContext:context];
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return theImage;
}
- 关于UIImage的图片处理(截图,合并图片)
- UIimage 图片的处理:缩放,设定大小,存储,截图
- UIImage图片处理:截图,缩放,设定大小,存储原文:图片的处理大概分截图(capture),缩
- UIImage 合并图片
- UIImage 合并图片
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- UIImage 图片处理:截图,缩放,设定大小,存储
- django学习记录(二)
- 一个Android程序员的悲催路
- Struts1.0数据处理过程笔记
- Linked List Cycle
- 大型互联网公司的产品选择的技术
- 关于UIImage的图片处理(截图,合并图片)
- MySql SDK 编程 简单查询
- 打造受欢迎的邮件营销欢迎信
- [the summarization of algorithm]How to list the prime number
- mybatis中文教程
- Spring MVC handlerMapping和handlerAdapter
- 最小物联网系统设计——使用说明
- 互联网女皇的互联网报告2013版(详细)
- Struts学习笔记