在我基于 phonegap 的应用程序中,当我以横向模式捕获图像时,它以纵向模式显示,我添加了代码
正确方向:真
但它仍然以纵向模式显示横向图像。这里的代码
function capturePhoto()
{
navigator.camera.getPicture(onPhotoURISuccess,fail, {
quality: 20,
correctOrientation: true,
destinationType:Camera.DestinationType.FILE_URI
});
}
function onPhotoURISuccess(imageURI)
{
var options = new FileUploadOptions();
options.fileKey = "file";
options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1);
options.mimeType = "image/jpeg";
if(App.gvars.userpic=='1')
{
document.getElementById('userpicw').src = imageURI;
}
if(App.gvars.userpic=='2')
{
document.getElementById('productpic').src = imageURI;
}
if(App.gvars.userpic=='3')
{
document.getElementById('userpicws').src = imageURI;
}
var largeImage = document.getElementById('smallImage');
largeImage.style.display = 'block';
App.gvars.userpic='0';
var params = new Object();
params.value1 = "Fastabuy";
options.params = params;
options.chunkedMode = false;
}
我应该怎么做。?