-
Notifications
You must be signed in to change notification settings - Fork 0
/
rm.hbs
64 lines (45 loc) · 1.89 KB
/
rm.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[![view on npm](https://img.shields.io/npm/v/@uttori/image-png.svg)](https://www.npmjs.org/package/@uttori/image-png)
[![npm module downloads](https://img.shields.io/npm/dt/@uttori/image-png.svg)](https://www.npmjs.org/package/@uttori/image-png)
[![Build Status](https://travis-ci.com/uttori/uttori-image-png.svg?branch=master)](https://travis-ci.com/uttori/uttori-image-png)
[![Dependency Status](https://david-dm.org/uttori/uttori-image-png.svg)](https://david-dm.org/uttori/uttori-image-png)
[![Coverage Status](https://coveralls.io/repos/github/uttori/uttori-image-png/badge.svg?branch=master)](https://coveralls.io/github/uttori/uttori-image-png?branch=master)
[![Tree-Shaking Support](https://badgen.net/bundlephobia/tree-shaking/@uttori/image-png)](https://bundlephobia.com/result?p=@uttori/image-png)
[![Dependency Count](https://badgen.net/bundlephobia/dependency-count/@uttori/image-png)](https://bundlephobia.com/result?p=@uttori/image-png)
[![Minified + GZip](https://badgen.net/bundlephobia/minzip/@uttori/image-png)](https://bundlephobia.com/result?p=@uttori/image-png)
[![Minified](https://badgen.net/bundlephobia/min/@uttori/image-png)](https://bundlephobia.com/result?p=@uttori/image-png)
# Uttori ImagePNG
A PNG Decoder and meta data reading utility.
## Install
```bash
npm install --save @uttori/image-png
```
# Config
```js
{
}
```
* * *
# Example
```js
const image_data = await FileUtility.readFile('./test/assets/PngSuite', 'oi1n0g16', 'png', null);
const image = ImagePNG.fromFile(image_data);
image.decodePixels();
const length = image.pixels.length;
➜ 6144
const pixel = image.getPixel(0, 0);
➜ [255, 255, 255, 255]
```
# API Reference
{{>main}}
* * *
## Tests
To run the test suite, first install the dependencies, then run `npm test`:
```bash
npm install
npm test
DEBUG=Uttori* npm test
```
## Contributors
* [Matthew Callis](https://github.com/MatthewCallis)
## License
* [MIT](LICENSE)