ImageMagick

Sample of usage ffi module with ImageMagick library.

Since ImageMagick® is a HUGE library, you can export function from there using this sample. We already done most types definition inside ImageMagickAPI.js

 var im = require("ImageMagick");
 im.convertImage('d:\\1.jpg', 'd:\\2.bmp');
 im.convertImage('d:\\1.jpg', 'd:\\2.bmp', {width: 50, height: 50});

Methods

convertImage(source, dest, newSizeopt) static

Convert image file source to file dest. If assigned newSize then resize image.
Arguments:
  1. source (string)  source file name
  2. dest (string)  destination file name
  3. [newSize] (Object)  new size of image
    Properties
    1. width (number)
    2. height (number)