代码:

RootViewController.h

#import <UIKit/UIKit.h>

@interface RootViewController : UIViewController

@end

RootViewController.m

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view. UIImage * image = [UIImage imageNamed:@"1.jpg"];
NSData * tempData;
if (UIImagePNGRepresentation(image)) {
tempData = UIImagePNGRepresentation(image);
NSLog(@"%@",tempData);
}
else{
tempData = UIImageJPEGRepresentation(image, 1);
}
CIImage * iImg = [CIImage imageWithData:tempData];
UIImage * tImg = [UIImage imageWithCIImage:iImg scale:1 orientation:UIImageOrientationRight];
NSLog(@"%@",UIImagePNGRepresentation(tImg));
UIImageView * imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 200, 200, 80)];
imageView.image = tImg;
[self.view addSubview:imageView]; }

最新文章

  1. 加深一下BlockingQueue的认识
  2. iOS如何彻底避免数组越界
  3. Dijkstra算法
  4. HDU 1536 S-Nim SG博弈
  5. linux中运维相关命令
  6. Java Collection框架详解
  7. Java for LeetCode 199 Binary Tree Right Side View
  8. 关于Entity Framework 5 从数据库生成模型时没有字段注释的解决方法!
  9. 数据库安全之TDE列加密
  10. JQuery 1.3.2联动获取部门
  11. RecyclerView android
  12. python基础杂记
  13. [面试]synchronized
  14. 根据SQL_ID查询并杀会话
  15. C#遍历文件夹下面所有指定格式文件
  16. MySQL大表DROP删除小技巧(转)
  17. JavaScript工具函数集
  18. Dell PowerEdge R630服务器VMware ESXI6.0服务器安装
  19. SQLite 编译错误 - 试图加载格式不正确的程序
  20. 百度UEditor富文本编辑器去除过滤div等标签

热门文章

  1. xUnit安装及注意事项
  2. Python补充06 Python之道
  3. CSS3制作心形头像
  4. 高级javascript---原型和原型继承
  5. 使用Spire组件抛出异常The type initializer for &#39;spr857&#39; threw an exception
  6. 如何使用免费PDF控件从PDF文档中提取文本和图片
  7. ORA-01439: 要更改数据类型, 则要修改的列必须为空
  8. Oracle Recovery 01 - 常规恢复之完全恢复
  9. iOS_UIImage_毛玻璃效果
  10. 函数----Beginning Visual C#