@lodev09/react-native-exify 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lodev09/react-native-exify
|
|
2
2
|
|
|
3
|
-
A simple library to read and write Exif metadata
|
|
3
|
+
A simple library to read and write image Exif metadata in React Native.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
- Read Exif data from an image
|
|
@@ -25,7 +25,6 @@ import { writeAsync, readAsync, ExifTags } from '@lodev09/react-native-exify';
|
|
|
25
25
|
// ...
|
|
26
26
|
const uri = 'file://path/to/image.jpg'
|
|
27
27
|
|
|
28
|
-
// Read exif from image via URI
|
|
29
28
|
const tags = await readAsync(uri)
|
|
30
29
|
console.log(tags)
|
|
31
30
|
```
|
|
@@ -34,11 +33,13 @@ console.log(tags)
|
|
|
34
33
|
```ts
|
|
35
34
|
const uri = 'file://path/to/image.jpg'
|
|
36
35
|
const newTags: ExifTags = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
GPSLatitude: 69.696969,
|
|
37
|
+
GPSLongitude: 69.696969,
|
|
38
|
+
UserComment: 'Someone wrote GPS here!',
|
|
40
39
|
}
|
|
41
|
-
|
|
40
|
+
|
|
41
|
+
const result = await writeAsync(uri, newTags)
|
|
42
|
+
console.log(result)
|
|
42
43
|
```
|
|
43
44
|
|
|
44
45
|
💡 Note: On IOS, writing exif into an Asset file will duplicate the image.
|