Skip to content

jeonghyeon-net/exif-curator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exif-curator

💾 Preserve and read original image EXIF metadata.

Install:

npm i exif-curator

Usage:

const jpegFile = (document.getElementById('jpegInput')! as HTMLInputElement).files![0];

const jpegDataUrl: string = await new Promise((resolve, reject) => {
  const reader = new FileReader();
  reader.onload = (e) => resolve(e.target!.result as string);
  reader.onerror = reject;
  reader.readAsDataURL(jpegFile);
});

const dumpedExifMetadata = await dumpExifMetadata(jpegDataUrl);

console.log(await loadExifMetadata(jpegDataUrl));

// generate image by svg-wasm

await replaceExifMetadata(imageData, dumpedExifMetadata)

About

💾 Preserve and read original image EXIF metadata.

Topics

Resources

License

Stars

Watchers

Forks

Contributors