var options = {
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
quality:20,
targetWidth: 544,
targetHeight: 544,
allowEdit: false,
saveToPhotoAlbum: false
};
alert("options"+options.destinationType);
this.camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64:
alert("image data "+imageData);
this.image = 'data:image/jpeg;base64,' + imageData;
alert("this.image << >> "+this.image);
this.getCalories(this.image);
}, (err) => {
console.log(err);
});