Package Exports
- images
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (images) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-images
Cross-platform image decoder(png/jpeg/gif) and encoder(png) for Nodejs
Installation
$ npm install images
Usage
var images = require('images'); //npm
// var images = require('./index.js'); //git
var img = new images.Image();
img.loadFromBuffer(fs.readFileSync("test/img/rotating_earth.gif"));
fs.writeFileSync("test/output/gif2png.png", img.toBuffer(images.TYPE_PNG));
Api
images.Image([width, heigth])
loadFromBuffer(buffer[, start, [end]]);
See test/loadFromBuffer.js
copyFromImage(x, y, width, height);
See test/copyFromImage.js
fillColor(red, green, blue[, alpha]);
See test/fillColor.js
drawImage(img, x, y);
See test/drawImage.js
toBuffer(type);
See test/toBuffer.js
width
readonly
height
readonly