cronshot-imagemagick
CronShot middleware to manipulate and save images with ImageMagick via gm
npm install cronshot-imagemagick
How
CronShot uses:
Setup
Install CronShot
npm install cronshot
Install ImageMagick
brew update && brew install imagemagick
Example
var cronshot = require('cronshot'),
middleware = {
'imagemagick': require('cronshot-imagemagick')
};
cronshot.startCapturing({
'url': 'http://sports.yahoo.com',
'path': __dirname,
'cronPattern': false,
'saveMiddleware': [{
'middleware': middleware.imagemagick,
'options': {
'gmCommands': [{
'method': 'trim',
'args': []
}, {
'method': 'transparent',
'args': ['#FFFFFF']
}]
}
}]
}, function(err) {
});
Options
Note: All methods supported by gm can be used
{
'path': '',
'imageName': '',
'gmCommands': []
}
Contributing
Please send all PR's to the dev
branch.
If your PR is a code change:
- Install all node.js dev dependencies:
npm install
- Update the appropriate module inside of the
src/modules
directory. - Add a unit test inside of
tests/unit/cronshot-imagemagick.js
. - Verify that all tests are passing by running
npm test
. - Send the PR!
Credits
CronShot-ImageMagick would not have been possible without the help/inspiration of the following libraries/awesome people:
- GraphicsMagick for node
- Copyright (c) Aaron Heckmann, 2010 - MIT License
Contributors