[英]Is capture image Saved in Photo Library of iPhone using phonegap
I capture image from device using phonegap, now I want to save that image in photogalary of iPhone. 我使用phonegap从设备捕获图像,现在我想将该图像保存在iPhone的照相馆中。 Please let me know that Is it possible or not?? 请让我知道是否可以?
Any help is appreciated. 任何帮助表示赞赏。 Thanks in advance. 提前致谢。
navigator.camera.getPicture(onSuccessCapturePhoto, onFailCapturePhoto, {
quality : 50,
destinationType : navigator.camera.DestinationType.FILE_URI,
saveToPhotoAlbum : true
});
I use saveToPhotoAlbum : true
, due to this images saved in photogallery. 我使用saveToPhotoAlbum : true
,因为此图像保存在相册中。
just add this line when you want to save image in gallary 要在图库中保存图像时,只需添加此行
UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);
You only need completionTarget, completionSelector and contextInfo if you want to be notified when the image is done saving, otherwise you can pass in nil. 如果要在图像保存完成时收到通知,则只需要completementTarget,completionSelector和contextInfo,否则可以传入nil。
for example.. 例如..
UIImageWriteToSavedPhotosAlbum(yourImage,nil,nil,nil);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.