我一直在使用以下代码来抓取照片并以 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 中。
再次感谢
电话间隙 1.3