Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Unable to show the image using getPicture

$
0
0

@kattasrinu wrote:

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);
});

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>