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

@fengyuanchen/exif

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fengyuanchen/exif

JavaScript Exif reader.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Exif

JavaScript Exif reader (only available in the browser).

  • Homepage
  • Exif standard version 2.3 (2012)

Install

npm install @fengyuanchen/exif
<script src="/path/to/exif.js"></script>

Usage

Four available usages:

  • new Exif(HTMLImageElement, options)
  • new Exif(HTMLImageElement.src, options)
  • new Exif(File, options)
  • new Exif(Blob, options)

Example:

<img id="image" src="image.jpg">
var image = document.getElementById('image');
var exif = new Exif(image, {
  done: function(tags) {
    console.log(tags);
  }
});

Options

You may set cropper options with new Exif(image, options).

exif

  • Type: Boolean
  • Default: true

Read Exif tags.

gps

  • Type: Boolean
  • Default: true

Read GPS tags.

interoperability

  • Type: Boolean
  • Default: true

Read interoperability tags.

ignored

  • Type: Array or Boolean
  • Default: ['MakerNote', 'UserComment']

Assign the ignored tags. Set false to disable it.

done

  • Type: Function
  • Default: null

Read success callback.

new Exif(image, {
  done: function(tags) {
    console.log(tags);
  }
});

fail

  • Type: Function
  • Default: null

Read error callback.

new Exif(image, {
  fail: function(message) {
    console.log(message);
  }
});

No conflict

If you have to use other global function with the same namespace, just call the Exif.noConflict static method to revert to it.

<script src="other-exif.js"></script>
<script src="exif.js"></script>
<script>
  Exif.noConflict();
  // Code that uses other `Exif` can follow here.
</script>

Browser support

  • Chrome (latest 2)
  • Firefox (latest 2)
  • Internet Explorer 10+
  • Opera (latest 2)
  • Safari (latest 2)

License

MIT © Fengyuan Chen

Keywords

FAQs

Package last updated on 16 Apr 2016

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