次のコードを使用して写真を取得し、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