Thumbbot
Create thumbnails from images, videos and web pages.
Installation
npm install thumbbot --save
Requirements
- PhantomJS - web page snapshots
- ImageMagick - image thumbnails
- ffmpeg - video snapshots
Usage
var Thumbbot = ;
Images
Resize
var image = 'image.png';image; // width, height // or imagewidth200; height200; var thumbnail = image;
Crop
var image = 'image.png';image; // x, y, width, height var thumbnail = image;
Videos
var video = 'video.mp4';video; // take a snapshot at 01:24 var thumbnail = video;
Web pages
var page = 'http://smashingmagazine.com';page // specify browser window size, optional // specify an area to capture, x, y, width & height, optional // disable javascript, optional ; // disable loading images, optional var thumbnail = page;
Tests
To run tests execute:
npm test
License
Thumbbot is released under the MIT License.