mirror of
https://github.com/danbulant/pngjs
synced 2026-06-19 22:41:58 +00:00
update README
This commit is contained in:
parent
51cc500a2e
commit
c38a7edf70
3 changed files with 10 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
.idea
|
||||
|
|
@ -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
7
examples/test.js
Normal 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
|
||||
})
|
||||
Loading…
Reference in a new issue