Exif for Node
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
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');
})();