0.2.0 • Published 5 months ago

portable-image-png v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Portable Image PNG

Lightweight PNG loader/saver written from scratch, supporting RGB/RGBA/Grayscale/Grayscale+Alpha and indexed mode.

Both Node.js and browser environment are supported.

The file is loaded inside a PortableImage data structure.

Note that unlike other PNG libs, the palette and index informations are kept. Other libs create a RGB/RGBA buffers for indexed PNG. It allows easy palette manipulations, and if a RGB/RGBA buffer is wanted, the PortableImage instance can easily convert it to RGB/RGBA.

Also the lib uses the CompressionStream API (available both in Node.js and browsers) to avoid zlib dependencies.

For instance the lib does not support Adam7 interlacing mode. The encoder is straightforward thus does not try to optimize for size.

Browser builds

Browser builds can be found inside the browser/ directory, Png.js and Png.min.js only contains the Png lib without PortableImage, while PortableImagePng.js and PortableImagePng.min.js have it.

0.2.0

5 months ago

0.1.0

8 months ago

0.0.2

8 months ago