Created
October 25, 2018 16:10
-
-
Save shamique/034771a6184546b5190dc43ca5bec4cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openCamera() { | |
this.platform.ready().then(readySource => { | |
const options: CameraOptions = { | |
quality: 100, | |
destinationType: this.camera.DestinationType.DATA_URL, | |
encodingType: this.camera.EncodingType.JPEG, | |
mediaType: this.camera.MediaType.PICTURE | |
}; | |
this.camera.getPicture(options).then( | |
imageData => { | |
this.imageView = "data:image/jpeg;base64," + imageData; | |
this.imageData = imageData; | |
}, | |
err => { | |
alert("Error in capture image"); | |
} | |
); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment