🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@lodev09/react-native-exify

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lodev09/react-native-exify

Read and write exif data into an image 🏷️

0.2.7
latest
Source
npm
Version published
Weekly downloads
9.9K
-48.45%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

exif

FAQs

Package last updated on 23 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts