Compress PNG images for a website to cut page load time by 60-80% while keeping full transparency support.
Batch-compress hundreds of PNG screenshots or icons in one command using a wildcard file pattern.
Embed pngquant's compression engine (libimagequant) in your own image processing tool to shrink PNGs programmatically.
Use pngquant in a build pipeline to automatically compress all PNG assets before deploying a web project.
Commercial or App Store use requires a separate paid license, GPL v3 does not cover closed-source distribution.
pngquant is a command-line tool that makes PNG image files significantly smaller. It does this by converting full-color PNG images (which can store millions of colors) into a version that uses at most 256 colors, a format called indexed or 8-bit PNG. The resulting files are typically 60 to 80 percent smaller than the originals and still support transparency. Every modern browser and operating system can display them, because 8-bit PNG is a standard format. The compression is lossy, meaning some color information is discarded, but the tool uses a quality setting similar to JPEG compression so you can control how much quality you are willing to give up. You set a minimum and maximum quality range (on a scale of 0 to 100), and the tool picks the smallest file that still meets your target. If it cannot reach your minimum quality threshold, it skips the file rather than saving a poor result. Using it is straightforward. You can compress a single file, run it on a batch of files at once using a wildcard, or pipe images through it as part of a larger processing workflow. Options include controlling the compression speed, disabling or adjusting dithering (a technique that adds subtle pixel patterns to smooth color transitions), stripping metadata from the file, and setting a custom output filename or extension. The compression engine is built on a library called libimagequant, which is also available separately for developers who want to embed the same compression logic in their own software. The tool takes advantage of multiple CPU cores and certain hardware instructions where available to run faster. pngquant is licensed under GPL v3 for open source use and under a separate commercial license for closed-source or App Store applications.
← kornelski on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.