简体   繁体   English

是否使用phonegap将捕获的图像保存在iPhone的照片库中

[英]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.

相关问题 如何使用JSON-通过PhoneGap(iPhone)进行JQuery将捕获的照片上传到REST界面? - How to upload a captured photo to REST interface using JSON - JQuery by PhoneGap (iPhone)? 使用phonegap相机api从iPhone获取图像 - get image from iphone, using phonegap camera api 使用jQuery和PhoneGap在Android中无法显示图像,但在iPhone中可以使用 - Image not displaying in Android using jQuery and PhoneGap but same works in iPhone iPhone上的html文件到照片库的屏幕截图 - screenshot of html file on iPhone to photo library 是否有一个不错的jQuery(Javascript)库来执行快速VIDEO(不是图像)缩放/平移? (目标:iPhone通过PhoneGap) - Is there a good jQuery (Javascript) library to do fast VIDEO (not image) zooming/panning? (target: iPhone through PhoneGap) Phonegap捕获图像然后将其上传到REST Web服务 - Phonegap capture image then upload it to REST webservice 捕获phonegap ios后保存图像 - save image after capture phonegap ios Phonegap拍照并将图像(BLOB)插入数据库SQLite - Phonegap take photo and insert image (BLOB) into database SQLite 如何使用jQuery plupload库在iPhone上打开音乐文件夹而不是照片文件夹 - How to open music folder and not photo folder on iphone with jQuery plupload library HTML2Canvas-在Phonegap应用程序中捕获Google Map到图像 - Html2canvas - capture google map to image in phonegap application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM