Sudoo-Exif-Node

Build Status codecov npm version downloads

:camera: Exif for Node

Install

yarn add @sudoo/exif-node
yarn add @sudoo/geometry @sudoo/immutable @sudoo/io # As peer dependencies
# or
npm install @sudoo/exif-node --save
npm install @sudoo/geometry @sudoo/immutable @sudoo/io --save # As peer dependencies

Example

import { ExifNode } from "@sudoo/exif-node";

(async () => {
    const exif: ExifNode = await ExifNode.loadFromFile('./example.jpg');
    exif.clear().merge({
        gpsLocation: {
            latitude: 41.878113,
            longitude: -70.6,
        },
    });
    exif.dump();
    await exif.saveAsFile('./out.jpg');
})();

Reference

Built on https://github.com/SudoDotDog/Sudoo-Exif