Create thumbnails from images, video, audio and web pages.
JavaScript Makefile
Latest commit d721d6d Jan 7, 2015 @vdemedes manually compiling es6
Permalink
Failed to load latest commit information.
build manually compiling es6 Jan 7, 2015
lib embracing ES6 Jan 3, 2015
test embracing ES6 Jan 3, 2015
.gitignore init Apr 1, 2012
Makefile manually compiling es6 Jan 7, 2015
Readme.md testing on circleci Jan 3, 2015
circle.yml testing on circleci Jan 3, 2015
index.js manually compiling es6 Jan 7, 2015
package.json manually compiling es6 Jan 7, 2015

Readme.md

Thumbbot

Create thumbnails from images, videos and web pages.

Circle CI

Installation

npm install thumbbot --save

Requirements

  • PhantomJS - web page snapshots
  • ImageMagick - image thumbnails
  • ffmpeg - video snapshots

Usage

var Thumbbot = require('thumbbot');

Images

Resize

var image = new Thumbbot('image.png');
image.resize(200, 200); // width, height

// or

image.width(200);
     .height(200);

var thumbnail = yield image.save();

Crop

var image = new Thumbbot('image.png');
image.crop(0, 0, 200, 200); // x, y, width, height

var thumbnail = yield image.save();

Videos

var video = new Thumbbot('video.mp4');
video.seek('00:01:24'); // take a snapshot at 01:24

var thumbnail = yield video.save();

Web pages

var page = new Thumbbot('http://smashingmagazine.com');
page.window(1024, 768) // specify browser window size, optional
    .crop(100, 100, 400, 400) // specify an area to capture, x, y, width & height, optional
    .disable('javascript') // disable javascript, optional
    .disable('images'); // disable loading images, optional

var thumbnail = yield page.save();

Tests

To run tests execute:

npm test

License

Thumbbot is released under the MIT License.