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
- Host: GitHub
- URL: https://github.com/szapp/heic-jpg-exif
- Owner: szapp
- License: mit
- Created: 2024-02-28T19:27:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-02T09:57:06.000Z (about 1 year ago)
- Last Synced: 2024-10-02T14:07:39.924Z (about 1 year ago)
- Topics: exif, heic, heic-to-jpg, image, metadata, npm-module
- Language: TypeScript
- Homepage: https://npmjs.com/package/heic-jpg-exif
- Size: 127 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# heic-jpg-exif
[](https://github.com/szapp/heic-jpg-exif/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/heic-jpg-exif)
[](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)