update README

This commit is contained in:
leogiese 2015-01-07 12:07:15 +08:00
parent 51cc500a2e
commit c38a7edf70
3 changed files with 10 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules
.idea

View file

@ -5,14 +5,14 @@ Simple PNG encoder/decoder for Node.js with no native dependencies.
Installation
===============
```
$ npm install node-png
$ npm install node-png --save
```
Example
==========
```js
var fs = require('fs'),
PNG = require('pngjs').PNG;
PNG = require('node-png').PNG;
fs.createReadStream('in.png')
.pipe(new PNG({

7
examples/test.js Normal file
View file

@ -0,0 +1,7 @@
var PNG = require("../lib/png").PNG;
(new PNG({width:1,height:1})).pack()
.on("end", function() {
console.log(this.data);
console.log("end !"); // never called
})