PPMQUANT(1)
π PPMQUANT π
okay bestie, gather round, we're doing the ppmquant page from the Netpbm user manual. it's a classic. it's also, um. a fossil. but we love her anyway π¦
β¨ NAME β¨
ppmquant β quantize the colors in a PPM image down to a specified number π
πΈ SYNOPSIS πΈ
ppmquant [-floyd|-fs] ncolors [ppmfile]
ppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]
okay so housekeeping rules for the flags, and these apply to everything in here:
- All options can be abbreviated to their shortest unique prefix. so like, you don't have to type the whole thing, just enough that it's unambiguous. queen of efficiency.
- You may use two hyphens instead of one to designate an option.
-fsand--fs, both iconic, both valid. - You may use either white space or equals signs between an option name and its value. so
-mapfile mapfileand-mapfile=mapfileare both fine β¨
π« DESCRIPTION π«
This program is part of Netpbm(1). π«Ά
okay, real talk. ppmquant is obsolete. like, it's giving "still on the group chat but never responds." All it does now is invoke pnmquant or pnmremap. That's the whole job. It's a middleman. It's a vibe.
So: you should use one of those programs if you're writing a new program, or if you're modifying an old program and your program doesn't have to work with a version of Netpbm before 9.21 (January 2001). ppmquant exists only for name compatibility. that's it. that's the whole reason she's still here. legacy queen π
mapping the lore:
pnmquantis fully backward compatible withppmquantwithout the-mapfileoption.pnmremapis fully backward compatible withppmquantwith the-mapfileoption.
Except with differences suggested by the syntax synopsis above (π the synopsis, bestie, look at it), ppmquant's function is the same as pnmquant and pnmremap.
β οΈ history lesson, because it's juicy: before Netpbm 10.19 (November 2003),ppmquantwas a completely separate program frompnmquant, and was a bona fide PPM program. Which means if you gave it a PGM or PBM image as input, it would process it as if it were PPM and generate a PPM output. π Now, since it is really a PNM program, it processes PBM and PGM inputs as what they actually are and produces the same kind of output. glow up, honestly.
π Note: the reasonppmquantwas changed in Netpbm 10.19 is that for some time before that,ppmquanthad a serious bug that would have been difficult to fix β it chose the wrong color set. Maintaining two versions of the same code did not make sense. so they deleted one. periodt.
π SEE ALSO π
go read those fr fr, they're the main characters now π
π AUTHOR π
Copyright (C) 1989, 1991 by Jef Poskanzer. π«Ά
π§ DOCUMENT SOURCE π§
This manual page was generated by the Netpbm tool makeman from HTML source. The master documentation is at
http://netpbm.sourceforge.net/doc/ppmquant.html
and that's the whole page, bestie!! π netpbm documentation, 22 October 2003 β yeah she's vintage, she's an antique, she's archive-core π¦ mwah, love u, go use pnmquant β¨πΈ
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms