# @fengyuanchen/exif

> JavaScript Exif reader.

Latest version **0.1.1** (published 2016-04-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @fengyuanchen/exif
pnpm add @fengyuanchen/exif
yarn add @fengyuanchen/exif
bun add @fengyuanchen/exif
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-04-16 |
| First published | 2015-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fengyuan Chen |
| Maintainers | fengyuanchen |
| Keywords | exif, tiff, gps, interoperability, reader, image, jpeg, javascript |

## Links

- npm: https://www.npmjs.com/package/@fengyuanchen/exif
- Repository: https://github.com/fengyuanchen/exif
- Homepage: https://github.com/fengyuanchen/exif#readme
- Issues: https://github.com/fengyuanchen/exif/issues
- npm.io page: https://npm.io/package/@fengyuanchen/exif

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2016-04-16
- 0.1.0 — 2015-12-25
- 0.0.1 — 2015-11-15

## README

# Exif

> JavaScript Exif reader (only available in the browser).

- [Homepage](http://fengyuanchen.github.io/exif)
- [Exif standard version 2.3 (2012)](http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf)



## Install

```
npm install @fengyuanchen/exif
```

```html
<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:

```html
<img id="image" src="image.jpg">
```

```js
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.

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


### fail

- Type: `Function`
- Default: `null`

Read error callback.

```js
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.

```html
<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](http://opensource.org/licenses/MIT) © [Fengyuan Chen](http://chenfengyuan.com)

---
_Source: https://npm.io/package/@fengyuanchen/exif · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
