简体   繁体   English

在“照片”应用中存储CGImage?(iPhone)

[英]Storing CGImage in Photos app?(iPhone)

可以说我有一个CGImage并想将其存储在每台iPod Touch / iPhone附带的Photos应用程序中,我该怎么做?

First convert the CGImage to a UIImage : 首先将CGImage转换为UIImage

UIImage *_myImage = [UIImage imageWithCGImage:cgImage];

And then use the UIImageWriteToSavedPhotosAlbum() function: 然后使用UIImageWriteToSavedPhotosAlbum()函数:

UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);

to write the UIImage to the Photo Album. UIImage写入相册。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM