Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

vivaxy/png

Folders and files

NameName
Last commit message
Last commit date
May 24, 2024
Feb 18, 2021
Dec 30, 2019
Dec 31, 2019
Feb 18, 2021
Oct 30, 2019
Dec 31, 2019
Oct 30, 2019
Oct 30, 2019
Oct 30, 2019
Oct 30, 2019
Oct 30, 2019
Jan 2, 2020
Apr 10, 2023
Oct 30, 2019
Apr 10, 2023
Feb 18, 2021
May 9, 2020
Oct 30, 2019
May 24, 2024

Repository files navigation

png

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov DOI

🖼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.

Articles

Prior Art

Project created by create-n.