I capture image from device using phonegap, now I want to save that image in photogalary of 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.
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.
for example..
UIImageWriteToSavedPhotosAlbum(yourImage,nil,nil,nil);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.