0.1.0 • Published 10 years ago
gm-to-grayscale v0.1.0
gm-to-grayscale
Use gm
to read an RGB buffer/image and make it grayscale.
Installation
npm install gm-to-grayscale
Usage
#!/usr/bin/env node
var gmToGrayscale = require('gm-to-grayscale');
gmToGrayscale('my-photo.png'), function (err, result) {
if (err) {
throw err;
}
console.log('Image size: ' + result.width + 'x' + result.height);
fs.writeFile('my-photo.gray', result.image, function (err) {
if (err) {
throw err;
}
});
});
0.1.0
10 years ago