0.2.7 • Published 1 month ago

@lodev09/react-native-exify v0.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

React Native Exify

CI GitHub Release NPM Downloads

A simple library to read and write image Exif metadata in React Native. Inspired from this thread.

Features

  • ✅ Read Exif data from an image
  • ✅ Write Exif data into an image
  • ✅ Tags are typed and standardized
  • ✅ Works with Expo and bare React Native projects

Installation

yarn add @lodev09/react-native-exify

Usage

import { writeAsync, readAsync, ExifTags } from '@lodev09/react-native-exify';

🧐 Reading Exif

// ...
const uri = 'file://path/to/image.jpg'

const tags = await readAsync(uri)
console.log(tags)

✍️ Writing Exif

const uri = 'file://path/to/image.jpg'
const newTags: ExifTags = {
  GPSLatitude: 69.69,
  GPSLongitude: 69.69,
  UserComment: 'Someone wrote GPS here!',
}

const result = await writeAsync(uri, newTags)
console.log(result.tags)

!NOTE On IOS, writing exif into an Asset file will duplicate the image. IOS does not allow writing exif into an Asset file directly. If you're getting the photo from a camera, write it into the output file first before saving to the Asset library!

See example for more detailed usage.

Contributing

Contributions are welcome!

See the contributing guide to learn how to contribute to the repository and the development workflow.

0.2.7

1 month ago

0.2.6

2 months ago

0.2.5

2 months ago

0.2.4

2 months ago

0.2.3

2 months ago

0.2.2

2 months ago

0.2.1

2 months ago

0.2.0

2 months ago

0.1.0

2 months ago