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:
-
source
(string)
 source file name
-
dest
(string)
 destination file name
-
[newSize]
(Object)
 new size of image
Properties
source
to file dest
. If assigned newSize then resize image.
source
(string)
 source file name
dest
(string)
 destination file name
[newSize]
(Object)
 new size of image