# photopea/UPNG.js

Fast and advanced PNG (APNG) decoder and encoder (lossy / lossless)

Repository: https://github.com/photopea/UPNG.js
Canonical: https://ross.abutalabs.com/products/upngjs
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2023-07-28T16:08:25+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3445, "days_push": 1132, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2215, forks 264 (observed 2026-08-28T04:06:27.073184+00:00)

## What it is
UPNG.js is a small, fast JavaScript library for encoding and decoding PNG and APNG images, serving as the main PNG engine for the Photopea image editor. It supports both lossless compression and lossy minification via color quantization, similar to TinyPNG.

## Use cases
- compress png images in javascript
- encode png from canvas pixel data
- create animated apng files in the browser
- minify png files like tinypng
- decode png files to raw rgba pixel data
- save 16-bit color png images
- reduce png file size by limiting color count

## When to choose
- you need PNG or APNG encoding/decoding in JavaScript without native dependencies
- you want lossy PNG compression through color quantization
- you need low-level control over bit depth and channel count when encoding
- you are building a browser or Node.js image processing pipeline

## When to avoid
- you need to work with formats other than PNG/APNG such as JPEG or WebP
- you require GPU-accelerated or extremely high-throughput image processing
- you need a full image editing feature set rather than just PNG codec functionality

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, compression, serialization
- domain: image-processing, graphics, web-development, files
- platform: browser, cross-platform
- tags: png, apng, encoder, decoder, image-optimization, quantization, lossy-compression, lossless-compression, photopea, nodejs, javascript

## Member repositories
- photopea/UPNG.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:27.073184+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:45:58.772626+00:00, confidence not recorded.
  - readme: https://github.com/photopea/UPNG.js (fetched 2026-08-28T04:06:27.073184+00:00, sha 857fc8e8df7f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
