0.1.8 • Published 6 years ago

react-native-exif-ll v0.1.8

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

React Native Exif LL fork

All Contributors

An image exif reader

NB This is a fork of https://github.com/francisco-sanchez-molina/react-native-exif which adds backwards compatibility with react-native < 0.47. This will not be maintatined once this PR https://github.com/francisco-sanchez-molina/react-native-exif/pull/21 has been merged

Installation

yarn add react-native-exif

or

npm install react-native-exif --save

Usage

getExif

import Exif from 'react-native-exif-ll'

...

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))

Exif values

Value
ImageWidth
ImageHeight
Orientation
originalUri
exif

getLatLong

Fetch geo coordinates as floats.

...
Exif.getLatLong('/sdcard/tt.jpg')
    .then(({latitude, longitude}) => {console.warn('OK: ' + latitude + ', ' + longitude)})
    .catch(msg => console.warn('ERROR: ' + msg))
...

Version 0.1.0 add react-native 0.40 support

Contributors

Thanks goes to these wonderful people (emoji key):

francisco-sanchez-molina💻Kesha Antonov💻Olivier Collet💻hygkui💻EurekaO💻

This project follows the all-contributors specification. Contributions of any kind welcome!