Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eris/exif

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eris/exif

Parses EXIF data.

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

exif

NPM Package Build Status Coverage Status Commitizen friendly

Parses and writes EXIF data from JPEG and NEF files.

Usage

yarn add @eris/exif

Node

Extracting Metadata
const fs = require('fs')
const parse = require('@eris/exif')
const metadata = parse(fs.readFileSync('./myfile.jpg'))
console.log(metadata)
/*
  {
    make: 'NIKON CORPORATION',
    width: 1498,
    createdAt: new Date('2017-03-16T02:25:25.000Z'),
    ...,
    _raw: {
      Make: 'NIKON CORPORATION',
      ImageWidth: 1498,
      DateTimeOriginal: '2017:03:16 02:25:25',
      ...
    }
  }
*/
Converting RAW Formats
const fs = require('fs')
const RAWDecoder = require('@eris/exif').Decoder

const myFile = fs.readFileSync('./DSC_0001.nef')
const myFileDecoder = new RAWDecoder(myFile)
const myFileAsJpeg = myFileDecoder.extractJPEG()
const metadata = myFileDecoder.extractMetadata()
fs.writeFileSync('./DSC_0001.jpg', myFileAsJpeg)
console.log(metadata)
// {Make: 'NIKON CORPORATION', Model: 'NIKON D4S', ISO: 160, ...}

Documention and Resources for Various Formats

FAQs

Package last updated on 30 Nov 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc