Images

pngquant – compress PNG images with efficient palettes

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
MozJPEGMozilla JPEG Encoder Project
pngquantUtility and a library for lossy compression of PNG images
SVGONode.js library and command-line application for optimizing SVG files
OxipngMultithreaded PNG optimizer, forked from Optipng
libjxlReference implementation of JPEG XL
libjpeg-turboJPEG image codec
QOIThe Quite OK Image Format
YOGAYummy Optimizer for Gorgeous Assets
pngcrushOptimizer for PNG files
jpegoptimOptimize JPEG files. Lossless and lossy compression available
OptiPNGAdvanced PNG optimizer
ECTFast and effective C++ file optimizer
CrunchLossy PNG image file optimization
zopflipngPNG optimisation tool using zopfli
JPEG ArchiveUtilities for archive JPEGs for long term storage
cavifConvert PNG and JPEG images to space-saving AVIF format
optimiztCLI image optimization tool
FlacaLosslessly compress GIF, JPEG and PNG images from the terminal
picoptMulti format lossless image optimize
tinifierCLI tool for compressing images using the TinyPNG API

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted