pngjs - Pure JS PNG Encoder/Decoder
JSON →pngjs is a pure JavaScript library for encoding and decoding PNG images, primarily designed for Node.js environments but also usable in browsers via Browserify. It offers both synchronous and asynchronous APIs, supporting a wide range of PNG bit depths (1, 2, 4, 8, 16-bit) and interlace types for reading. The library distinguishes itself by having no external dependencies, providing a lightweight solution for image manipulation. The current stable version is 7.0.0. While it supports reading various color types and bit depths, its asynchronous writing API primarily processes 8-bit per sample (channel) images and does not support interlaced mode for output. It can read `tTRNS` transparent colors and supports writing colortype 0 (grayscale), 2 (RGB), 4 (grayscale alpha), and 6 (RGBA), but currently lacks support for extended PNG features like animation and writing indexed color (colortype 3). Its API is compatible with older `pngjs` and `node-pngjs` implementations, and it is rigorously tested against the PNG Suite.
Traffic · last 30 days ↑625% vs prev 7d
top countries 🇨🇦 Canada · 🇺🇸 United States · 🇳🇴 Norway · 🇫🇷 France · VN