New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pngcrush-bin

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pngcrush-bin - npm Package Compare versions

Comparing version

to
0.1.13

cli.js

24

package.json
{
"name": "pngcrush-bin",
"version": "0.1.12",
"version": "0.1.13",
"description": "Pngcrush wrapper that makes it seamlessly available as a local dependency on OS X, Linux",

@@ -18,5 +18,4 @@ "keywords": [

},
"main": "lib/pngcrush",
"bin": {
"pngcrush": "bin/pngcrush.js"
"pngcrush": "cli.js"
},

@@ -28,4 +27,4 @@ "repository": {

"scripts": {
"test": "mocha ./test/test-build.js ./test/test-path.js",
"postinstall": "node ./lib/build.js"
"test": "mocha --reporter spec --timeout 0",
"postinstall": "node index.js"
},

@@ -39,13 +38,16 @@ "engines": {

"dependencies": {
"bin-wrapper": "~0.1.9",
"chalk": "~0.4.0"
"bin-build": "^0.1.0",
"bin-wrapper": "^0.3.0",
"chalk": "^0.4.0"
},
"devDependencies": {
"mocha": "~1.17.1"
"bin-check": "^0.1.0",
"mocha": "^1.18.2",
"rimraf": "^2.2.6"
},
"files": [
"bin",
"lib",
"vendor"
"cli.js",
"index.js",
"test"
]
}
# [node-pngcrush-bin](https://npmjs.org/package/pngcrush-bin)
## About
[pngcrush](http://pmt.sourceforge.net/pngcrush/) Node.js wrapper that optimize PNG images.
> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline.
> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline.
> Its main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods. It also can be used to remove unwanted ancillary chunks, or to add certain chunks including gAMA, tRNS, iCCP, and textual chunks.

@@ -18,12 +16,16 @@

```sh
$ npm install -g pngcrush-bin
$ npm install --save pngcrush-bin
```
## Usage with Node.js
## Usage
```js
var execFile = require('child_process').execFile;
var pngcrushPath = require('pngcrush-bin').path;
var pngcrush = require('pngcrush-bin').path;
execFile(pngcrushPath, ['-reduce', '-brute', 'dest.png'], function() {
execFile(pngcrush, ['-reduce', '-brute', 'input.png', 'output.png'], function (err) {
if (err) {
throw err;
}
console.log('Image minified');

@@ -36,2 +38,3 @@ });

This is licensed under BSD.
[pngcrush](http://pmt.sourceforge.net/pngcrush/) is licensed under OSI Approved License.