node-pngcrush
The node-pngcrush is an addon of node, as a readable/writable stream
Last updated 4 years ago by fansekey .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install node-pngcrush 
SYNC missed versions from official npm registry.

node-pngcrush

NPM version

node-pngcrush是一个node的插件,它把pngcrush内嵌到了插件中,而不是调用命令行的方式,提升处理速率,有效的省去了调用外部程序产生的时间开销。

安装

npm install -g node-pngcrush

使用


var C = require('node-pngcrush');

fs.readFile('./alphatest.png', function (err, data) {
  if (err) throw err;
  var buffer = C.compress(data);
  fs.writeFile('./alphatest_out.png', buffer, {
      flags: 'wb'
  }, function(err){});
});


更新日誌

0.4.0

  • Mac 下支持 Node 8.x 版本

Current Tags

  • 1.1.0                                ...           latest (4 years ago)

34 Versions

  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
  • 0.4.0                                ...           7 years ago
  • 0.3.7                                ...           9 years ago
  • 0.3.6                                ...           9 years ago
  • 0.3.5                                ...           9 years ago
  • 0.3.4                                ...           9 years ago
  • 0.3.3                                ...           9 years ago
  • 0.3.2                                ...           9 years ago
  • 0.3.1                                ...           9 years ago
  • 0.3.0                                ...           9 years ago
  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.9                                ...           10 years ago
  • 0.1.8                                ...           10 years ago
  • 0.1.7                                ...           10 years ago
  • 0.1.6                                ...           10 years ago
  • 0.1.5                                ...           10 years ago
  • 0.1.4                                ...           10 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           11 years ago
  • 0.0.9                                ...           11 years ago
  • 0.0.8                                ...           11 years ago
  • 0.0.7                                ...           11 years ago
  • 0.0.6                                ...           11 years ago
  • 0.0.5                                ...           11 years ago
  • 0.0.4                                ...           11 years ago
  • 0.0.3                                ...           11 years ago
  • 0.0.2                                ...           11 years ago
  • 0.0.1                                ...           11 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE