# extract-iptc

> Extracts IPTC/XMP metadata from images

Latest version **0.1.3** (published 2016-01-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install extract-iptc
pnpm add extract-iptc
yarn add extract-iptc
bun add extract-iptc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-01-03 |
| First published | 2015-11-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Anton Lysenko |
| Maintainers | chesco |
| Keywords | iptc, xmp, metadata, image, imagemagick, extract, parse |

## Links

- npm: https://www.npmjs.com/package/extract-iptc
- Repository: https://github.com/achesco/extract-iptc
- Homepage: https://github.com/achesco/extract-iptc#readme
- Issues: https://github.com/achesco/extract-iptc/issues
- npm.io page: https://npm.io/package/extract-iptc

## Dependencies (1)

- [imagemagick](https://npm.io/package/imagemagick.md) ^0.1.3

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2016-01-03
- 0.1.2 — 2015-11-12
- 0.1.1 — 2015-11-12
- 0.1.0 — 2015-11-12

## README

# extract-iptc

Simple wrapper and parser around imagemagick's convert CLI utility call to extract IPTC/XMP metadata.

## Installation

`npm install extract-iptc`

## Usage

``` js
var ExtractIptc = require('extract-iptc');

// if convert utility isn'n in PATH variable
ExtractIptc.setImageMagickConvertPath('/path/to/bin/convert');

ExtractIptc.extract('/path/to/image.jpg', function (error, meta) { 
    if (error) {
        console.error(error);
    }
    console.log('Title is: ' + meta.title);
    if (meta.keywords) {
        if (typeof meta.keywords === 'string') {
            console.log('Single keyword is: ' + meta.keywords);
        } else {
            console.log('Keywords are: ' + meta.keywords.join(', '));
        }
    }
    console.log('Copyrighted by: ' + meta.copyright);
});
```

## Resulting meta object fields reference

NB. Returns array for any tag values with multiple occurrences.

| extract-iptc | IPTC | XMP |
|--------------|------|-----|
| title | Object Name | Title |
| urgency | Urgency | Urgency |
| category | Category | Category |
| supplementalCategory | Supplemental Category | Supplemental Categories |
| keywords | Keywords | Keywords |
| instructions | Special Instruction | Instructions |
| dateCreated | Date Created | Date Created |
| author | By-line | Author |
| authorsPosition | By-line Title | AuthorsPosition |
| city | City | City |
| state | Province/State | State/Province |
| country | Country/Primary Location Name | Country |
| transmissionReference | Original Transmission Reference | Transmission Reference |
| headline | Headline | Headline |
| credit | Credit | Credit |
| source | Source | Source |
| copyright | Copyright Notice | Copyright Notice |
| description | Caption/Abstract | Description |
| writer | Writer/Editor | Description Writer |

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