JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 262
  • Score
    100M100P100Q86085F
  • License MIT

🖼A full-featured PNG decoder and encoder.

Package Exports

  • @stevebel/png
  • @stevebel/png/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stevebel/png) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

png

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov

🖼A full-featured PNG decoder and encoder. Fork of @vivaxy/png maintained as of Feb 2023.

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 @stevebel/png or npm i @stevebel/png

Usage

import * as png from '@stevebel/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.