@xn-sakina/image-magick
v1.0.0
Published
Easy use WASM-ImageMagick process image utils for webpack
Downloads
233
Maintainers
Readme
@xn-sakina/image-magick
Easy use WASM-ImageMagick process image utils for webpack.
Not need care about wasm load process
Install
pnpm add @xn-sakina/image-magick
Usage
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`,
],
});
License
MIT