Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including optipng-bin with all npm packages installed. Try it out:

var optipngBin = require("optipng-bin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

optipng-bin v0.1.0

OptiPNG wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows

node-optipng-bin Build Status

OptiPNG 0.7.4 Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows. Used to losslessly minify PNG images.

Example usage

var execFile = require('child_process').execFile;
var optipngPath = require('optipng-bin').path;

execFile(optipngPath, ['-v'], function(err, stdout, stderr) {
    console.log('OptiPNG version:', stdout.match(/\d\.\d.\d/)[0]);
});

You can also run it directly from ./node_modules/.bin/optipng-bin

License

Everything excluding the binaries licensed under the BSD license and copyright Google.

OptiPNG licensed under the zlib license and copyright Cosmin Truta and the Contributing Authors.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free