6.2.0 • Published 8 months ago
fast-png v6.2.0
fast-png
PNG image decoder and encoder written entirely in JavaScript.
Installation
$ npm install --save fast-png
Usage
decode(png[, options])
Arguments
png
- A TypedArray or Buffer that contains the PNG data.options
- An object of options
Options
checkCrc
- If set totrue
, the CRC will be checked for each chunk and an error will be thrown in case it's wrong (default: false).
encode(image)
Arguments
png
- An object representing the image. You can pass an ImageData from the Canvas API or an object with the following properties:width
- The width of the imageheight
- The height of the imagedata
- An array or TypedArray with the image datadepth
- A number indicating the color depth (only 8 and 16 are supported now). Defaults to 8.channels
- Number of channels, including alpha (1, 2, 3 and 4 are supported). Defaults to 4.
PNG standard
Spec can be found at: https://www.w3.org/TR/PNG/
License
6.2.0
8 months ago
6.1.0
2 years ago
6.0.1
2 years ago
6.0.0
2 years ago
5.0.4
3 years ago
5.0.3
3 years ago
5.0.2
4 years ago
5.0.1
4 years ago
5.0.0
4 years ago
4.0.1
5 years ago
4.0.0
5 years ago
3.1.3
5 years ago
3.1.2
5 years ago
3.1.1
5 years ago
3.1.0
7 years ago
3.0.0
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.1.0
8 years ago
1.0.0
8 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago