{"_id":"@colorhythm/exiftool-wasm","_rev":"5-43a144764a13928060beeb0ead310723","name":"@colorhythm/exiftool-wasm","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@colorhythm/exiftool-wasm","version":"1.0.0","keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"author":{"name":"colorhythm"},"license":"Apache-2.0","_id":"@colorhythm/exiftool-wasm@1.0.0","maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"homepage":"https://github.com/colorhythm/exiftool-wasm#readme","bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"dist":{"shasum":"a688e5298ed04e933e127a6830226a2782a127a7","tarball":"https://registry.npmjs.org/@colorhythm/exiftool-wasm/-/exiftool-wasm-1.0.0.tgz","fileCount":18,"integrity":"sha512-rlR5lZ7qweswjRH8P2G3KEZ/2ILPpMv4dH+4Avce6Pf5Leeis1HDl3wLTVROowRIgcUkHyXajlJeauC03or05w==","signatures":[{"sig":"MEYCIQD6Fwi/it9AovIr4+e+oouSo2IcoILrpdIaLoRPWC51wAIhAPS4QQ3CJEiKflIY7shdiJNSnR4PzbumGXuOXWTitXzy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@colorhythm%2fexiftool-wasm@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":26711540},"type":"module","types":"./dist/esm/types/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"}},"gitHead":"f16c70679959d04b123fdd600125012c16415458","scripts":{"test":"bun run build && node test/run.mjs","build":"npm run build:esm && bun build.ts","build:esm":"tsc --emitDeclarationOnly -p tsconfig.esm.json"},"_npmUser":{"name":"colorhythm2","email":"info@colorhythm.com"},"repository":{"url":"git+https://github.com/colorhythm/exiftool-wasm.git","type":"git"},"_npmVersion":"11.13.0","description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.15","@types/bun":"^1.3.2","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/exiftool-wasm_1.0.0_1781756814220_0.7705237103794464","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@colorhythm/exiftool-wasm","version":"1.0.1","keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"author":{"name":"colorhythm"},"license":"Apache-2.0","_id":"@colorhythm/exiftool-wasm@1.0.1","maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"homepage":"https://github.com/colorhythm/exiftool-wasm#readme","bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"dist":{"shasum":"85bc1b8fbf96e48d023fbd721ab7446851b0ac2c","tarball":"https://registry.npmjs.org/@colorhythm/exiftool-wasm/-/exiftool-wasm-1.0.1.tgz","fileCount":18,"integrity":"sha512-Lnxt+7AZNkzXQNdojFCMSLMiIBDxpf/3WZtCcPkVrayM63guL/GG7240LdC4ZBi8yUMQ19p7bO8t6N7WYH3cqA==","signatures":[{"sig":"MEUCIFeIro3ABhvb38lrOu7WmsOOomgYP+LbZNcafKzoVnhKAiEAs9paYjjudkzqOzZNIMupMFXfhpc8/J4IoCyvFkn0ylI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@colorhythm%2fexiftool-wasm@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":26623743},"type":"module","types":"./dist/esm/types/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"}},"gitHead":"98b4f1fc93832df1dad3dd113963ff9ea542dc10","scripts":{"test":"bun run build && node test/run.mjs","build":"npm run build:esm && bun build.ts","build:esm":"tsc --emitDeclarationOnly -p tsconfig.esm.json"},"_npmUser":{"name":"colorhythm2","email":"info@colorhythm.com"},"repository":{"url":"git+https://github.com/colorhythm/exiftool-wasm.git","type":"git"},"_npmVersion":"11.13.0","description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.15","@types/bun":"^1.3.2","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/exiftool-wasm_1.0.1_1781759049653_0.7717179836678427","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@colorhythm/exiftool-wasm","version":"1.0.2","keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"author":{"name":"colorhythm"},"license":"Apache-2.0","_id":"@colorhythm/exiftool-wasm@1.0.2","maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"homepage":"https://github.com/colorhythm/exiftool-wasm#readme","bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"dist":{"shasum":"3aa9704326846509d22a28ead1a7e463808a54b6","tarball":"https://registry.npmjs.org/@colorhythm/exiftool-wasm/-/exiftool-wasm-1.0.2.tgz","fileCount":18,"integrity":"sha512-ciVVHDpBiVobJp+/1E3h7IfBs9XDMSxlQIq3q4RTiRhG/qCbVvUv9pPy5TgtUCK1PVtr/vSsXDjP+MEAFJDQfg==","signatures":[{"sig":"MEUCIQDlUxxutpGYteFiD0yO0n5Kzc1XjkuH5Im0n5Zdt98zTwIgFdFQcjVaWLbOKWsMb59ZlB+jvoGytlwFWpolt950fKg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26633253},"type":"module","types":"./dist/esm/types/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"}},"gitHead":"8d66ef5238405deb8fc465b5758b398dc7f30672","scripts":{"test":"bun run build && node test/run.mjs","build":"npm run build:esm && bun build.ts","build:esm":"tsc --emitDeclarationOnly -p tsconfig.esm.json"},"_npmUser":{"name":"colorhythm2","email":"info@colorhythm.com"},"repository":{"url":"git+https://github.com/colorhythm/exiftool-wasm.git","type":"git"},"_npmVersion":"11.6.2","description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","directories":{},"_nodeVersion":"24.8.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.15","@types/bun":"^1.3.2","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/exiftool-wasm_1.0.2_1782945140313_0.33850462343696774","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@colorhythm/exiftool-wasm","version":"1.0.3","keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"author":{"name":"colorhythm"},"license":"Apache-2.0","_id":"@colorhythm/exiftool-wasm@1.0.3","maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"homepage":"https://github.com/colorhythm/exiftool-wasm#readme","bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"dist":{"shasum":"f74e9e187378bc6d4fa8fb326b6b9c6d4f9bc130","tarball":"https://registry.npmjs.org/@colorhythm/exiftool-wasm/-/exiftool-wasm-1.0.3.tgz","fileCount":18,"integrity":"sha512-aUCzPIVJ5xow88MD5DmhLhWpo8vFRqtpo7LTHRKdhooWVIlehwUgR3qd/b8NbcqEUizex6Omx7lA8DWBVE9/hQ==","signatures":[{"sig":"MEQCICvVDrSZFSlPZtbFoSUKK5GcEUbii51rragWftCSNEQyAiAuydDk15ulkZGknCAOFSiXCYw4VPGHjIvBLz63zMu6pA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26634005},"type":"module","types":"./dist/esm/types/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"./dist/esm/*.wasm":"./dist/esm/*.wasm"},"gitHead":"e12d577b26f03e0cf2d07cebd56c1980048827ab","scripts":{"test":"bun run build && node test/run.mjs","build":"npm run build:esm && bun build.ts","build:esm":"tsc --emitDeclarationOnly -p tsconfig.esm.json"},"_npmUser":{"name":"colorhythm2","email":"info@colorhythm.com"},"repository":{"url":"git+https://github.com/colorhythm/exiftool-wasm.git","type":"git"},"_npmVersion":"11.6.2","description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","directories":{},"_nodeVersion":"24.8.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.15","@types/bun":"^1.3.2","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/exiftool-wasm_1.0.3_1782964771441_0.6845009549236336","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@colorhythm/exiftool-wasm","version":"1.0.4","description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","scripts":{"build":"npm run build:esm && bun build.ts","build:esm":"tsc --emitDeclarationOnly -p tsconfig.esm.json","test":"bun run build && node test/run.mjs"},"module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"./dist/esm/*":"./dist/esm/*"},"keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"author":{"name":"colorhythm"},"license":"Apache-2.0","type":"module","types":"./dist/esm/types/index.d.ts","homepage":"https://github.com/colorhythm/exiftool-wasm#readme","repository":{"type":"git","url":"git+https://github.com/colorhythm/exiftool-wasm.git"},"bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"devDependencies":{"@types/bun":"^1.3.2","typescript":"^5.7.3","vitest":"^4.0.15"},"gitHead":"1f14f846f676c105e0c07ef51dd4d0a6a2c0ff50","_id":"@colorhythm/exiftool-wasm@1.0.4","_nodeVersion":"24.8.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-1sRiPURiKxz3gdvYnw346IXiPLjFedMWzbvjNq84RqCgfUEQUWLlfBuTE14WT3bNT+bFwXlr6rO4gHIgM+O8Ag==","shasum":"66bba2db36381cbe215515fb801fb1d2000d30dc","tarball":"https://registry.npmjs.org/@colorhythm/exiftool-wasm/-/exiftool-wasm-1.0.4.tgz","fileCount":18,"unpackedSize":26635367,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCb/0JJGG3L28jRIkzJPAaGErBUkVfQF78FdGLXvA9hEgIgJjsIIJp/oqpWmc00E4BXKJa6y8pD5GdY5Nu9vavFxfw="}]},"_npmUser":{"name":"colorhythm2","email":"info@colorhythm.com"},"directories":{},"maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/exiftool-wasm_1.0.4_1782978819512_0.03917993724834612"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T04:26:54.052Z","modified":"2026-07-02T07:53:39.965Z","1.0.0":"2026-06-18T04:26:54.515Z","1.0.1":"2026-06-18T05:04:10.008Z","1.0.2":"2026-07-01T22:32:20.621Z","1.0.3":"2026-07-02T03:59:31.711Z","1.0.4":"2026-07-02T07:53:39.834Z"},"bugs":{"url":"https://github.com/colorhythm/exiftool-wasm/issues"},"author":{"name":"colorhythm"},"license":"Apache-2.0","homepage":"https://github.com/colorhythm/exiftool-wasm#readme","keywords":["exiftool","metadata","exif","iptc","xmp","wasm","webassembly","browser","node","universal","files","images","documents","media","zeroperl"],"repository":{"type":"git","url":"git+https://github.com/colorhythm/exiftool-wasm.git"},"description":"Phil Harvey's ExifTool powered by WebAssembly to extract metadata from files in browsers and Node.js environments using zeroperl","maintainers":[{"name":"altert","email":"atikhonov@colorhythm.com"},{"name":"colorhythm2","email":"info@colorhythm.com"}],"readme":"# @colorhythm/exiftool-wasm\n\n[ExifTool](https://exiftool.org) powered by WebAssembly to extract and write metadata from files in browsers and Node.js environments using [zeroperl](https://github.com/colorhythm/zeroperl).\n\n## Installation\n\n```\nnpm install @colorhythm/exiftool-wasm\n```\n\n## Description\n\nThis package provides a WebAssembly-based implementation of ExifTool that works in both browser and Node.js environments. It leverages [zeroperl](https://github.com/colorhythm/zeroperl) to execute ExifTool without requiring any native binaries or system dependencies.\n\n## Usage\n\n### Basic Usage\n\n```typescript\nimport { parseMetadata } from '@colorhythm/exiftool-wasm';\n\n// Browser usage with File API\ndocument.querySelector('input[type=\"file\"]').addEventListener('change', async (event) => {\n  const file = event.target.files[0];\n  const result = await parseMetadata(file);\n\n  if (result.success) {\n    console.log(result.data);\n  } else {\n    console.error('Error:', result.error);\n  }\n});\n```\n\n### Writing Metadata\n\n```typescript\nimport { writeMetadata } from '@colorhythm/exiftool-wasm';\n\nconst result = await writeMetadata(file, {\n  'Author': 'John Doe',\n  'Title': 'My Photo',\n  'Keywords': 'nature,photography'\n});\n\nif (result.success) {\n  // result.data contains the modified file as Uint8Array\n  const modifiedBlob = new Blob([result.data]);\n}\n```\n\n### Extracting Specific Metadata\n\n```typescript\nimport { parseMetadata } from '@colorhythm/exiftool-wasm';\n\nconst result = await parseMetadata(file, {\n  args: ['-Author', '-CreateDate', '-Make', '-Model']\n});\n\nif (result.success) {\n  console.log(result.data);\n}\n```\n\n### JSON Output\n\n```typescript\nimport { parseMetadata } from '@colorhythm/exiftool-wasm';\n\nconst result = await parseMetadata(file, {\n  args: ['-json', '-n'],\n  transform: (data) => JSON.parse(data)\n});\n\nif (result.success) {\n  // Typed access to properties\n  console.log(result.data); // { ... }\n}\n```\n\n### Extracting Embedded Binaries\n\nPass `binary: true` to receive stdout as a raw `Uint8Array` — required for\nExifTool's `-b` output (embedded thumbnails/previews, MPF images and HDR\ngain maps, depth maps, ICC profiles, trailer payloads), which is not UTF-8\nand would be corrupted by text decoding.\n\n```typescript\nimport { parseMetadata } from '@colorhythm/exiftool-wasm';\n\nconst result = await parseMetadata(file, {\n  // -m ignores minor warnings, -q suppresses info messages — recommended,\n  // since any stderr output is treated as failure.\n  args: ['-b', '-ThumbnailImage', '-m', '-q'],\n  binary: true,\n});\n\nif (result.success) {\n  const blob = new Blob([result.data], { type: 'image/jpeg' });\n  // result.data is a byte-exact Uint8Array\n}\n```\n\nNotes:\n\n- `transform` is not applied in binary mode.\n- Extracting multiple `-b` tags in one call concatenates their bytes on\n  stdout with no delimiter — extract one tag per call, or use\n  `args: ['-json', '-b', ...]` (without `binary`) to get each tag as a\n  `base64:`-prefixed string in JSON.\n\n## Important Notes\n\n- In browser environments, pass the `File` object directly from file inputs. Do not convert it to an ArrayBuffer or Uint8Array.\n- This package uses asynchronous web APIs for file processing which allows handling files over 2GB without loading them entirely into memory.\n- ExifTool is executed entirely within the browser or Node.js environment - no server requests are made for metadata extraction.\n\n## API Reference\n\n### parseMetadata()\n\n```typescript\nasync function parseMetadata<TReturn = string>(\n  file: Binaryfile | File,\n  options: ExifToolOptions<TReturn> = {}\n): Promise<ExifToolOutput<TReturn>>\n```\n\n#### Parameters\n\n- `file`: Either a browser `File` object or a `Binaryfile` object with `name` and `data` properties.\n- `options`: Configuration options for the metadata extraction.\n\n### writeMetadata()\n\n```typescript\nasync function writeMetadata(\n  file: Binaryfile | File,\n  tags: ExifTags,\n  options: ExifToolOptions = {}\n): Promise<ExifToolOutput<ArrayBuffer>>\n```\n\n#### Parameters\n\n- `file`: Either a browser `File` object or a `Binaryfile` object with `name` and `data` properties.\n- `tags`: Object containing metadata tags to write, where keys are tag names and values are tag values.\n- `options`: Configuration options for the write operation.\n\n#### Return Value\n\nReturns a Promise that resolves to an `ExifToolOutput` object:\n\n```typescript\ntype ExifToolOutput<TOutput> =\n  | {\n      success: true;\n      data: TOutput;\n      error: string;\n      exitCode: 0;\n    }\n  | {\n      success: false;\n      data: undefined;\n      error: string;\n      exitCode: number | undefined;\n    };\n```\n\n## Acknowledgements\n\nThis package stands on the shoulders of three projects, with our thanks:\n\n- **[ExifTool](https://exiftool.org)** by **Phil Harvey** — three decades\n  of metadata craft; everything here is a delivery mechanism for his work.\n- **[uswriting/exiftool](https://github.com/uswriting/exiftool)** by\n  **Andrew Sampson** — the original ExifTool-in-WebAssembly wrapper this\n  package is forked from.\n- **[zeroperl](https://github.com/6over3/zeroperl)** (6over3 / Andrew\n  Sampson) — the sandboxed Perl-to-WASI runtime that makes running\n  ExifTool in a browser possible at all.\n\nOur fork adds byte-safe binary extraction (`binary: true`), Worker-scope\nsupport, `-config`-first handling, and packaging fixes — see the commit\nhistory.\n\n## License\n\nApache License, Version 2.0\n","readmeFilename":"README.md"}