Hi,
I want to preview the image which is captured . I am not able to get the preview of the image bay using fileuri, any suggestion… Below my code
capturePicture(){
const option: CameraOptions = {
quality: 50,
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
}
this.camera.getPicture(option).then((imageData) => {
this.capturedUrl = imageData;
}, (err) => {
// Handle error
});
}
<button ion-button block (click)="capturePicture()" >
<ion-icon name="camera"></ion-icon>
Camera
</button>
<img [src] = "capturedUrl" />