ZopfliPNG is a command-line PNG optimiser built around Google’s Zopfli compression algorithm. Its aim is to produce smaller PNG files than faster general-purpose compressors by spending substantially more CPU time searching for better DEFLATE output.
The program does more than run Zopfli over the existing IDAT stream. It can try alternative PNG filter strategies and colour representations, then keep the smallest result. That makes it best suited to assets where final file size matters more than processing speed, such as web images prepared once and served many times.
ZopfliPNG can process individual files or batches and can be run without writing output when you want to compare compression results first.
This is free and open source software.
Key Features
- Uses Zopfli compression to pursue smaller DEFLATE streams at the expense of much longer processing time.
- Provides a higher-compression mode that increases the number of optimisation iterations.
- Lets users set the number of Zopfli iterations directly to trade processing time against final file size.
- Tests different PNG filtering strategies, including standard per-scanline filters, entropy-based selection and brute-force filtering.
- Can preserve the original PNG colour type and bit depth when compatibility is more important than maximum compression.
- Can remove hidden RGB colour information from fully transparent pixels for smaller output, with no visible difference.
- Can reduce 16-bit-per-channel PNG images to 8-bit when the user explicitly accepts that lossy transformation.
- Strips non-essential metadata by default while allowing selected PNG chunks to be retained.
- Supports a quick mode for rapidly testing filters and colour types before committing to slower compression.
- Can use filename prefixes to optimise multiple PNG files in one invocation.
- Avoids replacing an existing result when that file is already smaller.
- Provides a dry-run mode for measuring compression without writing files.
- Produces standards-compliant PNG files that can be decoded by ordinary PNG software.
Website: github.com/google/zopfli
Support:
Developer: Lode Vandevenne and Jyrki Alakuijala
License: Apache License 2.0
zopflipng is written in C++ and C. Learn C++ with our recommended free books and free tutorials. Learn C 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.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.