You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

exif

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exif

A node.js library to extract Exif metadata from images.


Version published
Weekly downloads
14K
decreased by-2.36%
Maintainers
0
Install size
24.8 kB
Created
Weekly downloads
 

Readme

Source

node-exif

With node-exif you can extract Exif metadata from images (JPEG). Exif is a format used, for example, by digital cameras and scanners to save additional information about an image in the image file. This information can be the camera model, resolution, where the image was taken (GPS) or when it was taken.

Installation

Installing using npm (node package manager):

npm install exif

If you don't have npm installed or don't want to use it:

cd ~/.node_libraries
git clone git://github.com/gomfunkel/node-exif.git exif

Usage

Easy. Just require node-exif and throw an image at it. If node-exif is able to extract data from the image it does so and returns an object with all the information found, if an error occurs you will receive an error message. To prove that it really is easy please see the following example.

var ExifImage = require('exif').ExifImage;

try {
    new ExifImage({ image : 'myImage.jpg' }, function (error, image) {
        if (error)
            console.log('Error: '+error.message);
        else
            console.log(image); // Do something with your data!
    });
} catch (error) {
    console.log('Error: ' + error);
}

Instead of providing a filename of an image in your filesystem you can also pass a Buffer to ExifImage.

The data returned is an object with a couple of arrays, each of the arrays consists of the metadata extracted from the respective section. Please refer to ExifImage.js for a list of available tags and their meaning, there is a lot of them. This is subject to change, though, as it's not really self explanatory right now.

ToDo / Ideas

  • Testing, testing, testing
  • Performance improvements
  • Better access to extracted data
  • Fetch remote files and extract metadata from them
  • Extract makernote information
  • Enhance interoperability information
  • Add string representations for flags
  • You name it

License

node-exif is licensed under the MIT License. (See LICENSE)

FAQs

Package last updated on 28 Jan 2011

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc