我正在使用phonegap文件上传文件上传到服务器。当我从画廊中选择肖像照片时,它会旋转到风景
function selectPicture() {
navigator.camera.getPicture(
function(uri) {
var img = document.getElementById('camera_image');
img.style.visibility = "visible";
img.style.display = "block";
img.src = uri;
document.getElementById('camera_status').innerHTML = "Success";
},
function(e) {
console.log("Error getting picture: " + e);
document.getElementById('camera_status').innerHTML = "Error getting picture.";
},
{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI,correctOrientation : true, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY});
};
答案 0 :(得分:0)
有一个" correctOrientation" getPicture(http://docs.phonegap.com/en/edge/cordova_camera_camera.md.html)的参数尝试将其设置为false(或true:D)
希望这有帮助