Easy use WASM-ImageMagick process image utils for webpack.
Not need care about wasm load process
pnpm add @xn-sakina/image-magick
Everything is the same as WASM-ImageMagick
See example.
// example
import { buildInputFile, execute } from '@xn-sakina/image-magick'
const { stdout, stderr, exitCode, outputFiles } = await execute({
inputFiles: [await buildInputFile(imgUrl, "image.gif")],
commands: [
`convert image.gif -coalesce -crop 140x140+160+70 +repage -resize 200x100! -layers optimize result.gif`,
],
});
MIT