NSData与UIImage之间的转换
2015-09-30 17:18
357 查看
1 //NSData转换为UIImage 2 NSData *imageData = [NSData dataWithContentsOfFile: imagePath]; 3 UIImage *image = [UIImage imageWithData: imageData]; 4 5 //UIImage转换为NSData 6 NSData *imageData = UIImagePNGRepresentation(aimae);
相关文章推荐
- 《SICP》读书笔记--Chapter 2 Building Abstraction with Data
- CSU 1515 - Sequence (莫队)
- SpriteBuilder物理对象的父子关系
- SpriteBuilder物理对象的父子关系
- SpriteBuilder物理对象的父子关系
- UGUI 代码 动态添加 Event Trigger 的事件
- 利用StoryBoard修改placeholder颜色(UITextField的placeholder)
- Google Guice 依赖注入框架:简明教程
- poj2299:Ultra-QuickSort
- Parse query on pointer column
- UITableView使用selectRowAtIndexPath不能默认选中cell的问题
- UICollectionViewController 版本新特性
- 安装VMM 2012 R2累积更新1可能遇到的问题
- IOS开发-CALayer和UIView详细汇总
- c笔记05---逻辑表达式,break,continue 区别
- 《SICP》读书笔记--Chapter 1 Building Abstraction with Procedures
- OC编程无法识别UIImage,undeclared identifier 'image'
- Callable与Futrue创建线程
- 异常处理:使用UTF-8编码Mysql仍然抛出Incorrect string value异常
- UITextField键盘弹出调整承载textField的视图使其不被遮挡