【发布时间】:2019-01-18 19:51:26
【问题描述】:
这是我写的拍照代码,拍照后图片是旋转的
const cameraOptions: CameraOptions = {
quality: 50,
saveToPhotoAlbum: true,
//destinationType: this.camera.DestinationType.FILE_URI,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
// cameraDirection:this.camera.Direction.FRONT,
}
this.camera.getPicture(cameraOptions).then((imageData) => {
let base64Image = imageData;
this.image = base64Image;
this.initia=false;
this.ShowImg = 'data:image/jpeg;base64,' + base64Image;
console.log("base64Image", base64Image);
alert("Your photo is successfully uploaded.")
});
return this.image
【问题讨论】:
-
它发生在某些设备上。我已经遇到这个问题但没有找到任何解决方案
-
我明白了。我添加了正确的方向:是的,现在它对我有用。