Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. getPicture(){
  2. let options: CameraOptions = {
  3. destinationType: this.camera.DestinationType.DATA_URL,
  4. targetWidth: 1000,
  5. targetHeight: 1000,
  6. quality: 100
  7. }
  8. this.camera.getPicture( options )
  9. .then(imageData => {
  10. this.image = `data:image/jpeg;base64,${imageData}`;
  11. })
  12. .catch(error =>{
  13. console.error( error );
  14. });
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement