Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/smallest-png
Create a buffer of theoretically smallest PNG
https://github.com/shinnn/smallest-png
Last synced: 26 days 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 10 years ago)
- Default Branch: master
- Last Pushed: 2019-05-26T18:39:28.000Z (over 5 years ago)
- Last Synced: 2024-09-24T03:23:42.538Z (about 2 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
[![npm version](https://img.shields.io/npm/v/smallest-png.svg)](https://www.npmjs.com/package/smallest-png)
[![Github Actions](https://action-badges.now.sh/shinnn/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