fast-png

WebJar for fast-png

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

fast-png
Last Version

Last Version

3.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

fast-png
WebJar for fast-png
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/image-js/fast-png

Download fast-png

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/fast-png/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>fast-png</artifactId>
    <version>3.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/fast-png/
implementation 'org.webjars.npm:fast-png:3.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/fast-png/
implementation ("org.webjars.npm:fast-png:3.1.0")
'org.webjars.npm:fast-png:jar:3.1.0'
<dependency org="org.webjars.npm" name="fast-png" rev="3.1.0">
  <artifact name="fast-png" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='fast-png', version='3.1.0')
)
libraryDependencies += "org.webjars.npm" % "fast-png" % "3.1.0"
[org.webjars.npm/fast-png "3.1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : iobuffer jar [3.2.0,4)
org.webjars.npm : pako jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

fast-png

NPM version build status Test coverage npm download

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 to true, 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 image
    • height - The height of the image
    • data - An array or TypedArray with the image data
    • depth - 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

MIT

org.webjars.npm

Versions

Version
3.1.0