https://github.com/shinnn/smallest-png
Create a buffer of theoretically smallest PNG
https://github.com/shinnn/smallest-png
Last synced: 3 months ago
JSON representation
Create a buffer of theoretically smallest PNG
- Host: GitHub
- URL: https://github.com/shinnn/smallest-png
- Owner: shinnn
- License: mit-0
- Created: 2014-09-27T12:29:36.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-26T18:39:28.000Z (over 6 years ago)
- Last Synced: 2025-04-30T21:16:13.615Z (6 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# smallest-png
[](https://www.npmjs.com/package/smallest-png)
[](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/smallest-png)
A `Buffer` of [the theoretically smallest PNG](https://github.com/mathiasbynens/small/blob/master/png-transparent.png)
```javascript
const smallestPng = require('smallest-png');
//=>
smallestJpeg.length; //=> 67
```
Suitable for test fixtures.
```javascript
const {width, height} = somePngParserFunction(smallestPng);
console.assert(width === 1);
console.assert(height === 1);
```
## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install smallest-png
```
## API
```javascript
const smallestPng = require('smallest-png');
```
### smallestPng
Type: [`Buffer`](https://nodejs.org/api/buffer.html#buffer_class_buffer)
## Related
* [smallest-jpeg](https://github.com/shinnn/smallest-jpeg) — A [JPEG](https://jpeg.org/jpeg/) version
## License
[MIT No Attribution](./LICENSE) © 2019 Watanabe Shinnosuke