Socket
Book a DemoInstallSign in
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.1.1-alpha.6
Source
npmnpm
Version published
Weekly downloads
19
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 07 Nov 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.