Socket
Socket
Sign inDemoInstall

exif-parser

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exif-parser

A javascript library to extract Exif metadata from images, in node and in the browser.


Version published
Weekly downloads
986K
decreased by-19.65%
Maintainers
1
Weekly downloads
 
Created

What is exif-parser?

The exif-parser npm package is a library for parsing EXIF (Exchangeable Image File Format) metadata from image files. It allows you to extract various metadata such as camera settings, GPS information, and timestamps from JPEG and TIFF images.

What are exif-parser's main functionalities?

Extract EXIF Data

This feature allows you to extract EXIF metadata from an image file. The code reads an image file into a buffer, creates an EXIF parser instance, and then parses the EXIF data, which is logged to the console.

const fs = require('fs');
const exifParser = require('exif-parser');

const buffer = fs.readFileSync('path/to/image.jpg');
const parser = exifParser.create(buffer);
const result = parser.parse();
console.log(result);

Extract Specific Tags

This feature allows you to extract specific EXIF tags from an image file. The code reads an image file into a buffer, creates an EXIF parser instance, parses the EXIF data, and then logs specific tags such as the camera make and model.

const fs = require('fs');
const exifParser = require('exif-parser');

const buffer = fs.readFileSync('path/to/image.jpg');
const parser = exifParser.create(buffer);
const result = parser.parse();
const tags = result.tags;
console.log(tags.Make); // Camera make
console.log(tags.Model); // Camera model

Extract GPS Information

This feature allows you to extract GPS information from an image file. The code reads an image file into a buffer, creates an EXIF parser instance, parses the EXIF data, and then logs the GPS latitude and longitude.

const fs = require('fs');
const exifParser = require('exif-parser');

const buffer = fs.readFileSync('path/to/image.jpg');
const parser = exifParser.create(buffer);
const result = parser.parse();
const gpsInfo = result.tags.GPSLatitude + ', ' + result.tags.GPSLongitude;
console.log(gpsInfo);

Other packages similar to exif-parser

Keywords

FAQs

Package last updated on 19 Jul 2017

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