@vivaxy/png
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

png

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov

🖼A full-featured PNG decoder and encoder.

Supports

  • Environments: Browsers and Node.js
  • Chunks: IHDR, PLTE, IDAT, IEND, tRNS, cHRM, gAMA, iCCP, sBIT, sRGB, tEXt, zTXt, iTXt, bKGD, hIST, pHYs, sPLT, tIME
  • Color Types: Greyscale, Truecolour, Indexed-colour (Palette), Greyscale with alpha, Truecolour with alpha
  • Bit Depths: 1, 2, 4, 8, 16
  • Filters: None, Sub, Up, Average, Paeth

Install

yarn add @vivaxy/png or npm i @vivaxy/png

Usage

import * as png from '@vivaxy/png';

const metadata = png.decode(imageBuffer);
const imageBuffer = png.encode(metadata);

See metadata type definition in metadata.ts.

Prior Art

Project created by create-n.

Package Sidebar

Install

npm i @vivaxy/png

Weekly Downloads

1,147

Version

1.3.0

License

MIT

Unpacked Size

127 kB

Total Files

62

Last publish

Collaborators

  • vivaxy