# jpeg-exif

> Use for parse .jpg file exif info (including GPS info.).

Latest version **1.1.4** (published 2019-08-18) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install jpeg-exif
pnpm add jpeg-exif
yarn add jpeg-exif
bun add jpeg-exif
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2019-08-18 |
| First published | 2015-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 898.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | s@zhso.net |
| Maintainers | zhso |
| Keywords | jpeg, exif, gps, image, picture, photo, jfif |

## Links

- npm: https://www.npmjs.com/package/jpeg-exif
- Repository: https://github.com/zhso/jpeg-exif
- Issues: https://github.com/zhso/jpeg-exif/issues
- npm.io page: https://npm.io/package/jpeg-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

- 1.1.4 (latest) — 2019-08-18
- 1.1.3 — 2018-11-12
- 1.1.2 — 2018-07-19
- 1.1.1 — 2018-06-12
- 1.1.0 — 2018-06-12
- 1.0.6 — 2017-02-20
- 1.0.5 — 2016-08-30
- 1.0.4 — 2016-08-29
- 1.0.2 — 2016-08-29
- 1.0.1 — 2016-08-29
- 1.0.0 — 2016-08-23
- 0.0.9 — 2016-06-30
- 0.0.8 — 2016-03-29
- 0.0.7 — 2016-03-23
- 0.0.6 — 2016-03-22
- … 5 more at https://npm.io/package/jpeg-exif/versions

## README

# jpeg-exif
Get exif information from jpeg format file. Works with TIFF too!

[![npm](https://img.shields.io/npm/dm/jpeg-exif.svg)][npm-url] [![Inline docs](http://inch-ci.org/github/zhso/jpeg-exif.svg?branch=master&style=shields)](http://inch-ci.org/github/zhso/jpeg-exif) [![Build Status](https://travis-ci.org/zhso/jpeg-exif.svg?branch=master)](https://travis-ci.org/zhso/jpeg-exif) [![Coverage Status](https://coveralls.io/repos/github/zhso/jpeg-exif/badge.svg?branch=master)](https://coveralls.io/github/zhso/jpeg-exif?branch=master)

[npm-url]: https://npmjs.org/package/jpeg-exif
### Async

```js
import exif from "jpeg-exif";

const filePath = "~/Photo/IMG_0001.JPG";

exif.parse(filePath, (err, data) => {
    if (err) {
        console.log(err);
    } else {
        console.log(data);
    }
});
```

### Sync

```js
import exif from "jpeg-exif";

const filePath = "~/Photo/IMG_0001.JPG";
const data = exif.parseSync(filePath);

console.log(data);
```

## From Buffer

```js
import fs from "fs";
import exif from "jpeg-exif";

const filePath = "~/Documents/DOC_0001.TIFF";
const buffer = fs.readFileSync(filePath);
const data = exif.fromBuffer(buffer);

console.log(data);
```

## Features

* Support All CP3451 Standard Tags (Include GPS & SubExif Tags)
* Support Sync, Async
* Support pass Buffer Type

## Installation

```bash
$ npm i jpeg-exif
```

## Callback Data Format

```js
{
    "Make": "Apple",
    "Model": "Apple",
    //...
    "SubExif": [
        "DateTimeOriginal": "2015:10:06 17:19:36",
        "CreateDate": "2015:10:06 17:19:36",
        //...
    ],
    "GPSInfo":[
        "GPSLatitudeRef": "N",
        "GPSLatitude": [ 35, 39, 40.08 ],
	    //...
    ]
}
```

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