mirror of
https://github.com/danbulant/pngjs
synced 2026-07-07 04:00:39 +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
|
node_modules
|
||||||
|
.idea
|
||||||
|
|
@ -5,14 +5,14 @@ Simple PNG encoder/decoder for Node.js with no native dependencies.
|
||||||
Installation
|
Installation
|
||||||
===============
|
===============
|
||||||
```
|
```
|
||||||
$ npm install node-png
|
$ npm install node-png --save
|
||||||
```
|
```
|
||||||
|
|
||||||
Example
|
Example
|
||||||
==========
|
==========
|
||||||
```js
|
```js
|
||||||
var fs = require('fs'),
|
var fs = require('fs'),
|
||||||
PNG = require('pngjs').PNG;
|
PNG = require('node-png').PNG;
|
||||||
|
|
||||||
fs.createReadStream('in.png')
|
fs.createReadStream('in.png')
|
||||||
.pipe(new 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