diff --git a/.gitignore b/.gitignore index 3c3629e..34977ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.idea \ No newline at end of file diff --git a/README.md b/README.md index 6099eef..384dff5 100644 --- a/README.md +++ b/README.md @@ -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({ diff --git a/examples/test.js b/examples/test.js new file mode 100644 index 0000000..8018373 --- /dev/null +++ b/examples/test.js @@ -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 + }) \ No newline at end of file