Remove filter type -1

This commit is contained in:
Luke Page 2015-09-08 08:01:04 +01:00
parent 99c5b43871
commit 75d2927e75

View file

@ -163,11 +163,9 @@ Returns `this` for method chaining.
For example, the following code copies the top-left 100x50 px of `in.png` into dst and writes it to `out.png`: For example, the following code copies the top-left 100x50 px of `in.png` into dst and writes it to `out.png`:
```js ```js
var dst = new PNG({filterType: -1, width: 100, height: 50}); var dst = new PNG({width: 100, height: 50});
fs.createReadStream('in.png') fs.createReadStream('in.png')
.pipe(new PNG({ .pipe(new PNG())
filterType: -1
}))
.on('parsed', function() { .on('parsed', function() {
this.bitblt(dst, 0, 0, 100, 50, 0, 0); this.bitblt(dst, 0, 0, 100, 50, 0, 0);
dst.pack().pipe(fs.createWriteStream('out.png')); dst.pack().pipe(fs.createWriteStream('out.png'));
@ -183,9 +181,7 @@ The following example reads a file, adjusts the gamma (which sets the gamma to 0
```js ```js
fs.createReadStream('in.png') fs.createReadStream('in.png')
.pipe(new PNG({ .pipe(new PNG())
filterType: -1
}))
.on('parsed', function() { .on('parsed', function() {
this.adjustGamma(); this.adjustGamma();
this.pack().pipe(fs.createWriteStream('out.png')); this.pack().pipe(fs.createWriteStream('out.png'));