@wasm-zoo/imagemagick
v0.4.4
Published
ImageMagick 7.1.2-32 compiled for browser WebAssembly by WASM Zoo, with Consumer API v1 and bundled runtime assets.
Maintainers
Readme
@wasm-zoo/imagemagick
Unofficial WASM Zoo distribution of the ImageMagick magick CLI for browsers. This package is backed by ImageMagick 7.1.2-32, Zoo builder 0.4.4, and the reviewed browser-full Release asset.
Install
npm install @wasm-zoo/imagemagickUse
import { load } from "@wasm-zoo/imagemagick";
const magick = await load();
try {
const result = await magick.exec(["/input.png", "-resize", "640x640>", "/out/output.jpg"], {
files: [{ name: "/input.png", data: inputBytes }],
dirs: ["/out"],
outputs: ["/out/output.jpg"]
});
console.log(result.files[0]);
} finally {
magick.dispose();
}The default entry imports the reviewed browser wrapper and uses static new URL(..., import.meta.url) references so modern bundlers can emit magick-core.js, magick-core.wasm. For manual/self-hosted deployments use @wasm-zoo/imagemagick/self-hosted and the Consumer API v1 baseUrl contract.
No SharedArrayBuffer or cross-origin isolation is required. The magick CLI runs in an isolated Web Worker with MEMFS and the reviewed PNG/JPEG-focused delegate set.
