Skip to content

Commit

Permalink
Merge pull request #12 from perryh/readme
Browse files Browse the repository at this point in the history
Add updated options in README usage and test
  • Loading branch information
papandreou committed Jan 21, 2017
2 parents 15898ac + 50f7bf7 commit 7a2abda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the `pngquant` binary (defaults to `[256]`):

```javascript
var PngQuant = require('pngquant'),
myPngQuanter = new PngQuant([192, '-ordered']);
myPngQuanter = new PngQuant([192, '--quality', '60-80', '--nofs', '-']);

sourceStream.pipe(myPngQuanter).pipe(destinationStream);
```
Expand Down
5 changes: 3 additions & 2 deletions test/PngQuant.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ it.skipIf = function (condition) {
};

describe('PngQuant', function () {
it('should produce a smaller file', function () {

it('should produce a smaller file with lower quality and ordered dithering', function () {
return expect(
fs.createReadStream(pathModule.resolve(__dirname, 'purplealpha24bit.png')),
'when piped through',
new PngQuant([128]),
new PngQuant([128, '--quality', '60-80', '--nofs']),
'to yield output satisfying',
function (resultPngBuffer) {
expect(resultPngBuffer.length, 'to be within', 0, 8285);
Expand Down

0 comments on commit 7a2abda

Please sign in to comment.