您好,在我的 android phonegap 应用程序中,当我以纵向模式拍摄图像时,图像会在检索图像时旋转。
这是我捕获图像的代码:
navigator.device.capture.captureImage(captureSuccess, captureError, {limit: 1});
如果我将 correctOrientation 设置为 true,则没有任何区别。
如果我使用下面的代码,那么图像以正确的方向存储但保存在缓存中。是否有任何解决方案可以保存在 DCIM\Camera 路径中?
navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
destinationType: navigator.camera.DestinationType.FILE_URI,
correctOrientation: true });
请帮助我。提前致谢
最佳答案
要拍摄照片,您需要使用 getPicture 方法并将照片存储在 DCIM\Camera 路径中,您需要将 saveToPhotoAlbum 参数设置为 true。
navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
destinationType: navigator.camera.DestinationType.FILE_URI,
saveToPhotoAlbum: true,
correctOrientation: true });
关于android - 需要获取捕获图像的当前方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13988273/