jpck

1.0.2 • Public • Published

jpck

a streamable wrapper around js-mozjpegs jpegtran.

you can use all jpegtran command line options in the object passed to jpck(options).

be aware that js-mozjpeg is blocking. with the limit option you can set a maximum number of bytes for the input jpeg to be optimized. larger jpegs will just be passe through.

usage

 
var fs = require("fs");
var jpck = require("jpck");
 
fs.createReadStream("./in.jpg").pipe(jpck({ optimize: true, copy: "none", fastcrush: true, limit: 102400 })).pipe(fs.createWriteStream("./out.jpg"));
 

Package Sidebar

Install

npm i jpck

Weekly Downloads

1

Version

1.0.2

License

Unlicense

Unpacked Size

2.28 kB

Total Files

3

Last publish

Collaborators

  • yetzt