Skip to content

satyarohith/deno-imagemagick

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno-imagemagick

Ported from Magick.WASM

This is a beta, there's a lot of features missing, but is a starting point

Example

import {
  initializeImageMagick,
  ImageMagick,
  MagickImage
} from "https://deno.land/x/deno_imagemagick/mod.ts"

await initializeImageMagick(); // make sure to initialize first!

const lena: Uint8Array = await Deno.readFile('lena.jpg');

ImageMagick.read(lena, (img: MagickImage) => {
  img.blur(20, 6);
  img.resize(200, 100);

  img.write((data: Uint8Array) => {
    // do something
  }, MagickFormat.Jpeg);
});

Live Example

Make sure to have denon installed.

$ cd demo
$ denon start

About

Deno port of the WASM library for ImageMagick

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%