Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.camera.takePictureAsync().then(obj => {
- const uri = obj.uri;
- const width = obj.width;
- const height = obj.height;
- let picPath = LATEST_IMG
- ImageManipulator.manipulateAsync(uri,
- [{resize: {width: 0.25 * width, height: 0.25 * height}}, {flip: {horizontal: true}}], {base64: true, format: 'jpeg'})
- .then(obj => {
- const uriFlipped = obj.uri;
- const base64 = obj.base64;
- FileSystem.writeAsStringAsync(LATEST_IMG, base64).then(() => console.log('photo saved'))
- this.setState({takingPhoto: false, photo: uriFlipped})
- });
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement