pngquant is a command-line PNG compressor that reduces file size by converting 24-bit and 32-bit images to efficient 8-bit indexed PNGs while retaining alpha transparency.
Its strength is palette generation. pngquant uses advanced quantisation, gamma correction and premultiplied alpha handling to select colours that preserve perceived image quality with far fewer palette entries. It can also apply controlled dithering to reduce visible banding without adding unnecessary noise.
The tool is designed for both interactive use and automated pipelines. It accepts multiple input files, supports Unix-style standard input and output, and can decline to save an image when the requested quality cannot be met.
This is free and open source software.
Key Features
- Converts true-colour PNG images to palette-based 8-bit PNG with alpha transparency.
- Uses a high-quality quantisation algorithm derived from libimagequant.
- Supports configurable minimum and maximum quality thresholds similar to JPEG quality controls.
- Automatically chooses the number of colours required to satisfy the requested quality range.
- Can skip an image when quantisation would fall below the minimum acceptable quality.
- Provides configurable Floyd-Steinberg dithering and can disable dithering completely.
- Offers a speed-versus-quality control for workloads ranging from offline optimisation to time-sensitive image generation.
- Can avoid writing an output file when the compressed result would be larger than the source.
- Supports batch conversion of multiple PNG files.
- Works with standard input and standard output for use in shell pipelines.
- Can overwrite source files when explicitly requested or write to a chosen output path or filename suffix.
- Can strip optional PNG chunks to remove unnecessary metadata.
- Includes palette posterisation controls for reduced-precision displays and texture workflows.
- Uses multicore processing through libimagequant where supported.
- Supports colour management through Little CMS when built with that feature enabled.
Website: github.com/kornelski/pngquant
Support:
Developer: Kornel Lesiński
License: GNU General Public License v3.0
pngquant is written in C and Rust. Learn C with our recommended free books and free tutorials. Learn Rust with our recommended free books and free tutorials.
Related Software
| Console Based Image Compression Tools | |
|---|---|
| MozJPEG | Mozilla JPEG Encoder Project |
| pngquant | Utility and a library for lossy compression of PNG images |
| SVGO | Node.js library and command-line application for optimizing SVG files |
| Oxipng | Multithreaded PNG optimizer, forked from Optipng |
| libjxl | Reference implementation of JPEG XL |
| libjpeg-turbo | JPEG image codec |
| QOI | The Quite OK Image Format |
| YOGA | Yummy Optimizer for Gorgeous Assets |
| pngcrush | Optimizer for PNG files |
| jpegoptim | Optimize JPEG files. Lossless and lossy compression available |
| OptiPNG | Advanced PNG optimizer |
| ECT | Fast and effective C++ file optimizer |
| Crunch | Lossy PNG image file optimization |
| zopflipng | PNG optimisation tool using zopfli |
| JPEG Archive | Utilities for archive JPEGs for long term storage |
| cavif | Convert PNG and JPEG images to space-saving AVIF format |
| optimizt | CLI image optimization tool |
| Flaca | Losslessly compress GIF, JPEG and PNG images from the terminal |
| picopt | Multi format lossless image optimize |
| tinifier | CLI tool for compressing images using the TinyPNG API |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.