PNGQUANT(1)
๐ PNGQUANT(1) ๐
okay bestie, welcome to the pngquant manual, the pngquant(1) page, and honestly? it's a whole vibe. sit down, grab a strawberry, we're about to make your PNGs โจtinyโจ.
๐ NAME ๐
pngquant โ PNG converter and lossy image compressor. yeah. it squishes. it converts. it does both and it does them well. ๐
โจ SYNOPSIS โจ
pngquant โจoptionsโฉ [ncolors] file [file ...]
pngquant โจoptionsโฉ [ncolors] - <file >file
๐ฆ DESCRIPTION ๐ฆ
so basically: pngquant takes your 32-bit RGBA PNGs and turns them into 8-bit (or even smaller, no cap) RGBA-palette PNGs, and if you want, it'll do Floyd-Steinberg dithering on the way. it's giving glow-down for file size, glow-up for vibes. ๐
the output filename is literally the same as the input name, except it ends in -fs8.png or -or8.png โ unless your input is stdin, in which case the quantized image just goes straight to stdout like the main character it is. ๐ซถ
and the default behavior if the output file already exists? it skips the conversion. it's not rude, it's just cautious. use --force if you want it to overwrite. ๐
๐ OPTIONS ๐
-o out.png,--output out.pngโ writes the converted file to the path you gave. heads up bestie: when you use this option, only a single input file is allowed. one. uno. no plus-ones. ๐--ext new.pngโ the file extension (suffix) to use for output files, instead of the default-fs8.pngor-or8.png. your suffix, your rules. โจ-f,--forceโ overwrite existing output files. and yes,โ--ext .png --forceโcan be used to convert files in placeโฆ which is unsafe. not me telling you to be careful, but like, be careful. ๐--nofs,--orderedโ disables Floyd-Steinberg dithering. sometimes you just want it plain. ๐ง--floyd [=N]โ sets the dithering level with a fractional number between0(none) and1(full, and yes, that's the default). ๐-s N,--speed Nโ from1(brute-force, the try-hard) to11(fastest, the sprinter). default is3. speed10has 5% lower quality but is about 8 times faster than the default. speed11disables dithering and lowers compression level. pick your fighter. ๐ฅ-Q min-max,--quality min-maxโminandmaxare numbers in range0(worst) to100(perfect), just like JPEG.pngquantwill use the least amount of colors required to meet or exceed the max quality. but if the conversion results in quality below the min quality, the image won't be saved (or, if you're outputting to stdin, the 24-bit original will be output instead) andpngquantwill exit with status code99. so like, a little dramatic, but valid. ๐ญ--skip-if-largerโ if the conversion results in a file larger than the original, the image won't be saved andpngquantwill exit with status code98. also, the file size gain must be greater than the amount of quality lost. if quality drops by 50%, it will expect 50% file size reduction to consider it worthwhile. it's doing math. it's doing fair math. ๐--posterize bitsโ truncates the number of least significant bits of color (per channel). use this when the image will be output on low-depth displays (e.g. 16-bit RGB).pngquantwill make almost-opaque pixels fully opaque and will reduce the amount of semi-transparent colors. and when this option is enabled, the default filename suffix becomes-ie-fs8.png/-ie-or8.png. new suffix, who dis. ๐--stripโ removes optional chunks (metadata) from PNG files. bye bye extra baggage. ๐ธ--transbugโ a workaround for readers that expect fully transparent color to be the last entry in the palette. some readers are just built different. ๐-v,--verboseโ enables verbose messages showing progress and information about input/output. the opposite is--quiet. and ngl, errors are output to stderr regardless of this option, so no hiding from the truth. ๐ค-V,--versionโ displays version on stdout and exits. short and sweet. โญ-h,--helpโ displays help and exits. your little guidebook. ๐
๐ EXAMPLE ๐
creating a new image with the number of colors reduced to 64:
pngquant 64 image.png
the resulting image will have 64 colors and will be saved as image-fs8.png. slay. โจ
overwriting an image in-place if it can be reduced without too much quality loss:
pngquant -f --ext .png --quality 70-95 image.png
look at you go. ๐
๐ AUTHOR ๐
pngquant is developed by Kornel Lesinski โจkornel@pngquant.orgโฉ based on code by Greg Roelofs โจnewt@pobox.comโฉ.
pngquant homepage: https://pngquant.org โ go say hi, they're iconic. ๐ซถ
and that's the whole page bestie, no notes, you're gonna compress so good. periodt. ๐โจ
this lil' cutie is from 2013-02-25, and it's the pngquant(1) page โ ily, go make some tiny PNGs ๐ธ๐
๐ฆ where this page comes from
- alpine 3.24: pngquant-doc 3.0.3-r0 ยท GPL-3.0-or-later
- arch rolling: pngquant 3.0.3-3 ยท GPL-3.0-or-later AND ISC AND BSD-2-Clause
- debian bookworm: pngquant 2.17.0-1 ยท BSD-2-Clause
- debian trixie: pngquant 2.18.0-1+b1 ยท BSD-2-Clause
- epel 9: pngquant 2.17.0-2.el9 ยท GPLv3+
- fedora 43: pngquant 2.18.0-10.fc43 ยท GPL-3.0-or-later
- fedora 44: pngquant 2.18.0-12.fc44 ยท GPL-3.0-or-later
- nixpkgs unstable: pngquant 3.0.3
- opensuse-leap 16.0: pngquant 2.18.0-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: pngquant 2.18.0-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: pngquant 2.18.0-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: pngquant 2.18.0-160000.2.2 ยท GPL-3.0-or-later
- ubuntu jammy: pngquant 2.13.1-1 ยท BSD-2-Clause
- ubuntu noble: pngquant 2.18.0-1build2 ยท BSD-2-Clause
- ubuntu questing: pngquant 2.18.0-1build2
- ubuntu resolute: pngquant 2.18.0-1build3 ยท BSD-2-Clause
- ubuntu stonking: pngquant 2.18.0-1build3 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms