optipng-stream-bin
Wrapper around optipng-bin for use with stdin/stdout
Last updated 12 years ago by ameyp .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install optipng-stream-bin 
SYNC missed versions from official npm registry.

optipng-stream-bin Build Status

Issues with the output should be reported on the image-min issue tracker.

This is a wrapper around node-optipng-bin to add support for reading input PNG data from STDIN and writing the generated output PNG data to STDOUT. The module is intended to be used only as a binary in the same style as modules that use bin-wrapper. It cannot be used in any other fashion.

Usage

var fs = require('fs');
var optipng = require('optipng-stream-bin').path;
var spawn = require('child_process').spawn;

var cp = spawn(optipng, ['-o2']);
var read = fs.createReadStream('test.png');
var write = fs.createWriteStream('test-optimized.png');

read.pipe(cp.stdin);
cp.stdout.pipe(write);

License

MIT © Amey Parulekar

Current Tags

  • 0.0.7                                ...           latest (12 years ago)

7 Versions

  • 0.0.7                                ...           12 years ago
  • 0.0.6                                ...           12 years ago
  • 0.0.5                                ...           12 years ago
  • 0.0.4                                ...           12 years ago
  • 0.0.3                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |