An open API service indexing awesome lists of open source software.

https://github.com/szapp/heic-jpg-exif

Conversion from HEIC to JPG while retaining essential EXIF metadata
https://github.com/szapp/heic-jpg-exif

exif heic heic-to-jpg image metadata npm-module

Last synced: 4 months ago
JSON representation

Conversion from HEIC to JPG while retaining essential EXIF metadata

Awesome Lists containing this project

README

          

# heic-jpg-exif

[![ci](https://github.com/szapp/heic-jpg-exif/actions/workflows/ci.yml/badge.svg)](https://github.com/szapp/heic-jpg-exif/actions/workflows/ci.yml)
[![npm-downloads](https://img.shields.io/npm/dm/heic-jpg-exif.svg)](https://www.npmjs.com/package/heic-jpg-exif)
[![npm-version](https://img.shields.io/npm/v/heic-jpg-exif.svg)](https://www.npmjs.com/package/heic-jpg-exif)

Conversion from HEIC to JPG while retaining essential EXIF metadata

## Install

```bash
npm install heic-jpg-exif
```

## Usage (NodeJS)

```javascript
const convert = require('heic-jpg-exif');
````

Convert an HEIC image file to a JPEG file at maximum quality (1)

```javascript
await convert('input.HEIC', 'output.jpg', 1);
```

Convert an HEIC buffer to a JPEG buffer

```javascript
const inBuffer = fs.readFileSync('input.HEIC');
const outBuffer = await convert(inBuffer);
```

## Background

The HEIC image is first converted to a JPG with `heic-convert` and then complemented with the EXIF metadata of the source image using `exifr` and `piexif-ts`.

## See also

* [heic-convert](https://www.npmjs.com/package/heic-convert)
* [exifr](https://www.npmjs.com/package/exifr)
* [piexif-ts](https://www.npmjs.com/package/piexif-ts)