daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.camera.takePictureAsync().then(obj => {
  2.         const uri = obj.uri;
  3.         const width = obj.width;
  4.         const height = obj.height;
  5.         let picPath = LATEST_IMG
  6.         ImageManipulator.manipulateAsync(uri,
  7.           [{resize: {width: 0.25 * width, height: 0.25 * height}}, {flip: {horizontal: true}}], {base64: true, format: 'jpeg'})
  8.           .then(obj => {
  9.             const uriFlipped = obj.uri;
  10.             const base64 = obj.base64;
  11.             FileSystem.writeAsStringAsync(LATEST_IMG, base64).then(() => console.log('photo saved'))
  12.             this.setState({takingPhoto: false, photo: uriFlipped})
  13.         });        
  14.       })
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top