码迷,mamicode.com
首页 > 其他好文 > 详细

用ALAssetsLibrary将过滤后图片写入照片库

时间:2014-12-25 12:46:15      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

 

转载自:http://blog.sina.com.cn/s/blog_61235faa0100z3dp.html

CIImage *saveToSave = [filter outputImage];

CGImageRef cgImg = [context createCGImage:saveToSave fromRect:[saveToSave extent]];

ALAssetsLibrary
* library = [[ALAssetsLibrary alloc] init];
[library writeImageToSavedPhotosAlbum:cgImg metadata:[saveToSave properties] completionBlock:
^(NSURL *assetURL, NSError *error) { CGImageRelease(cgImg);
}];

 

用ALAssetsLibrary将过滤后图片写入照片库

标签:

原文地址:http://www.cnblogs.com/allanliu/p/4184259.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!