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

 

转载自: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);
}];

 

posted on 2014-12-25 11:27  奋进的闹钟  阅读(125)  评论(0编辑  收藏  举报

导航