我一直在使用下面的代碼來抓取一張照片,並在html中顯示效果很好。Phonegap 1.3 captureImage圖片庫和顯示圖像的HTML /應用程序接口
function takePicture() {
navigator.camera.getPicture(
function(uri) {
var img = document.getElementById('camera_image1');
img.style.visibility = "visible";
img.style.display = "block";
img.src = uri;
document.getElementById('camera_status').innerHTML = "Success";
},
{ quality: 50, allowEdit: true, destinationType: navigator.camera.DestinationType.FILE_URI});
};
HTML後
<img style="width:144px;height:144px;" id="camera_image1" src="nophoto.jpg"/>
不過,我想將圖像保存到用戶庫在同一時間,任何指針十分讚賞。
我已經嘗試使用captureImage,但這給了我更少的選項喜歡編輯,並沒有放置圖像內聯在HTML中。
再次感謝
的PhoneGap 1.3
我使用PhoneGap的:建立這樣的跨平臺:( – adamprocter 2012-02-08 20:40:36
我不認爲它可以在本PhoneGap的API來完成:( – ghostCoder 2012-02-09 05:10:28