Detalhes do pacote

@stevebel/png

stevebel543MIT1.5.1

🖼A full-featured PNG decoder and encoder.

png, vivaxy, image, parser

readme (leia-me)

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.

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.5.1 (2023-02-25)

1.3.0 (2020-01-02)

Features

  • iccp: :sparkles: update icc profile typings (f6de54a)

1.2.0 (2019-12-31)

Features

  • encode: :sparkles: support bit depth 2 (bb234bd)
  • encode: :sparkles: support bKGD (6514fc4)
  • encode: :sparkles: support cHRM (ad1c959)
  • encode: :sparkles: support filter 0, 1, 2, 3, 4 (3087f67)
  • encode: :sparkles: support gMMA and filter 1 (f379167)
  • encode: :sparkles: support hIST (fd6e9a7)
  • encode: :sparkles: support iCCP (d689c00)
  • encode: :sparkles: support IDAT, color type 3 and filter 0 (506c2a2)
  • encode: :sparkles: support IHDR (9e95e10)
  • encode: :sparkles: support interlace (496a332)
  • encode: :sparkles: support iTXt (375c749)
  • encode: :sparkles: support PLTE (e14dca8)
  • encode: :sparkles: support pYHs (e0473f0)
  • encode: :sparkles: support signature (ebecb94)
  • encode: :sparkles: support sPLT (56a48a7)
  • encode: :sparkles: support sRGB (0e3f570)
  • encode: :sparkles: support tEXt (3dc0e2e)
  • encode: :sparkles: support tIME (613dfdd)
  • encode: :sparkles: support tRNS with color type 0 (e53c063)
  • encode: :sparkles: support tRNS with color type 2 (1bf65a4)
  • encode: :sparkles: support zTXt (2b6fbe8)

Bug Fixes

  • encode: :bug: fix filter 1, 3 and 4 (cae9672)

1.1.0 (2019-12-29)

Features

  • decode: :sparkles: support cHRM (6735885)
  • decode: :sparkles: support gAMA (33b7385)
  • decode: :sparkles: support hIST (4d78118)
  • decode: :sparkles: support iCCP (99ee169)
  • decode: :sparkles: support iTXt (6b867cc)
  • decode: :sparkles: support pHYs (7b0bf80)
  • decode: :sparkles: support sBIT (5cef76d)
  • decode: :sparkles: support sPLT (c58a478)
  • decode: :sparkles: support sRGB (77edb37)
  • decode: :sparkles: support tEXt (e0f49b6)
  • decode: :sparkles: support tIME (fc6df50)
  • decode: :sparkles: support zTXt (2a348fe)

1.0.0 (2019-12-28)

Features

  • decode: :sparkles: support crc32 and parse IEND (43f52a4)
  • decode: :sparkles: support bit depth 1 (b218092)
  • decode: :sparkles: support bit depth 1 (#2) (7016d2d)
  • decode: :sparkles: support bit depth 16, filter 1, filter 2 and re (25e5793)
  • decode: :sparkles: support bit depth 4 (afd8b1f)
  • decode: :sparkles: support bit depth 8 (1f3d999)
  • decode: :sparkles: support bKGD chunk (6a2b447)
  • decode: :sparkles: support color type 2 (e927a0e)
  • decode: :sparkles: support color type 6 (7710aec)
  • decode: :sparkles: support filter 3 (9131680)
  • decode: :sparkles: support filter 4 and color type 4 (88b4950)
  • decode: :sparkles: support interlace (1bbf6eb)
  • decode: :sparkles: support tRNS (d32e449)

0.0.1 (2019-11-05)

Features

  • decode: :sparkles: implement parser (bb4a263)
  • decode: :sparkles: support colorType 3 and depth 2 (1eebacd)
  • init: :sparkles: init project (6f2afb4)
  • decode: :sparkles: support chunk IDAT (71041b4)
  • decode: :sparkles: implement parser (98fa580)