UNPKG

xmp-js

Version:

Read and parse XMP from JPEG

18 lines (12 loc) 374 B
const XMP = require("./dist/xmp.cjs.min.js"), fs = require("fs"); fs.readFile("assets/logo.jpg", (err, file) => { if (err) { console.error("Error while reading the file", err); } console.time("Parse XMP"); let xmp = new XMP(file), parsed = xmp.parse(); console.timeEnd("Parse XMP"); console.log(parsed); });