An image exif reader
yarn add @qeepsake/react-native-image-exif
or
npm install @qeepsake/react-native-image-exif
import Exif from 'react-native-exif'
...
Exif.getExif('/sdcard/tt.jpg')
.then(msg => console.warn('OK: ' + JSON.stringify(msg)))
.catch(msg => console.warn('ERROR: ' + msg))
...
Exif.getExif('content://media/external/images/media/111')
.then(msg => console.warn('OK: ' + JSON.stringify(msg)))
.catch(msg => console.warn('ERROR: ' + msg))
...
Exif.getExif('assets-library://asset/asset.JPG?id=xxxx&ext=JPG')
.then(msg => console.warn('OK: ' + JSON.stringify(msg)))
.catch(msg => console.warn('ERROR: ' + msg))
Value |
---|
ImageWidth |
ImageHeight |
Orientation |
originalUri |
exif |
Fetch geo coordinates as floats.
...
Exif.getLatLong('/sdcard/tt.jpg')
.then(({latitude, longitude}) => {console.warn('OK: ' + latitude + ', ' + longitude)})
.catch(msg => console.warn('ERROR: ' + msg))
...
Thanks goes to these wonderful people (emoji key):
francisco-sanchez-molina 💻 |
Kesha Antonov 💻 |
Olivier Collet 💻 |
hygkui 💻 |
EurekaO 💻 |
Colin Basnett 💻 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!