thumbnail-stream

0.1.0 • Public • Published

thumbnail-stream

Build Status

Generates thumbnails from a stream of PNG buffers.

var thumbnailStream = require('thumbnail-stream').ThumbnailStream({ size: 250, sample: 2 });
var writePNGStream = require('thumbnail-stream').WritePNGStream('./tmp');
process.stdin
    .pipe(split())
    .pipe(thumbnailStream)
    .pipe(writePNGStream)

ThumbnailStream: input is a png buffer, output is png buffer resized to a thumbnail. Expects an object of options, all of which are optional.

Parameter Description Default
size length of 1 side of resulting thumbnail 350
sample to only generate thumbnails for every nth buffer 1

WritePNGStream: input is a png buffer, output is pngs written to provided location. Expects a path to where the pngs should be written.


thumbnailstream

thumbnailstream <baseurl> <size>

This module also provides a cli wrapper command that replays requests against a <baseurl> generating png buffers, and captures the output as thumbnails in ./tmp. Expects paths to be piped to stdin. (Optional) <size> length of 1 side of resulting thumbnail, defaults to 350. Uses request stream from cloudfront-log-reader.

Readme

Keywords

none

Package Sidebar

Install

npm i thumbnail-stream

Weekly Downloads

2

Version

0.1.0

License

BSD

Last publish

Collaborators

  • emilymcafee