smallest-png

2.0.0 • Public • Published

smallest-png

npm version Build Status

A Buffer of the theoretically smallest PNG

const smallestPng = require('smallest-png');
//=> <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 01 00 00 00 01 08 06 00 00 00 1f ...>
 
smallestJpeg.length; //=> 67

Suitable for test fixtures.

const {width, height} = somePngParserFunction(smallestPng);
 
console.assert(width === 1);
console.assert(height === 1);

Installation

Use npm.

npm install smallest-png

API

const smallestPng = require('smallest-png');

smallestPng

Type: Buffer

Related

License

MIT No Attribution © 2019 Shinnosuke Watanabe

Package Sidebar

Install

npm i smallest-png

Weekly Downloads

1

Version

2.0.0

License

MIT-0

Unpacked Size

2.86 kB

Total Files

4

Last publish

Collaborators

  • shinnn