PHP 8.2.30
Preview: README.md Size: 1.66 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/jpeg-exif/README.md

# 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 ],
	    //...
    ]
}
```

Directory Contents

Dirs: 3 × Files: 6

Name Size Perms Modified Actions
lib DIR
- drwxr-xr-x 2026-02-14 19:20:16
Edit Download
src DIR
- drwxr-xr-x 2026-02-14 19:20:16
Edit Download
test DIR
- drwxr-xr-x 2026-02-14 19:20:16
Edit Download
32 B lrw-r--r-- 2026-02-14 19:19:12
Edit Download
32 B lrw-r--r-- 2026-02-14 19:20:14
Edit Download
171 B lrw-r--r-- 2026-02-14 19:20:16
Edit Download
1.05 KB lrw-r--r-- 2026-02-14 19:20:16
Edit Download
1.17 KB lrw-r--r-- 2026-02-14 19:20:16
Edit Download
1.66 KB lrw-r--r-- 2026-02-14 19:20:16
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).