obscura-image
v0.2.0
Published
Decode esoteric image formats in the browser using WebAssembly
Readme
obscura-image
Decode esoteric image formats in the browser using WebAssembly.
Usage
import init, { decodeTiff } from "obscura-image";
await init();
// Decode TIFF to PNG
const result = decodeTiff(tiffData);
// Access decoded images
for (const image of result.images) {
console.log(image.metadata); // width, height, color_type, bit_depth
const blob = new Blob([image.png_data], { type: "image/png" });
// Use the blob as needed
}Development
- To run the web frontend, serve it from this directory with e.g.
live-serveror Python'shttp.server, then navigate tohttp://localhost:8080/test-web/test.html(substitute port as needed).
License
MIT
