PGMTOPBM(1)
π Pgmtopbm User Manual π
okay bestie, gather round, because we're talking about pgmtopbm, and this is a Netpbm situation. This page is the manual for the pgmtopbm command, and I need you to know before we even start that this one is basically a vintage item. Collector's edition. Still cute, still works-ish, but we've moved on. π¦
β¨ NAME β¨
pgmtopbm β convert a PGM image to PBM
no cap, that's the whole elevator pitch. π
β¨ SYNOPSIS β¨
pgmtopbm
[-floyd | -fs | -threshold | -hilbert | -dither8 | -d8 | -cluster3 | -c3
| -cluster4 | -c4 | -cluster8 | -c8]
[-value val]
[-clump size]
[-randomseed integer]
[pgmfile]
so like, that's the whole menu of flags right there. Those dithering-method flags are the only ones we're discussing on this page, and the [-value val], [-clump size], [-randomseed integer] and the optional pgmfile argument are just... chilling at the bottom of the synopsis. That's it. That's the list. π
β¨ DESCRIPTION β¨
This program is part of Netpbm(1). Hi bestie, welcome to the family. π«Ά
Okay so here's the tea: pgmtopbm is almost entirely obsolete since Netpbm 10.23 (July 2004). That's the whole vibe. If you want to do the thing this program used to do, you use pamditherbw(1) instead. Periodt.
And here's the plot twist β pgmtopbm never was the simple converter it appeared to be. It was a dithering program, bestie. It was out here doing dithering the whole time and we didn't even know. But β and this is the part that hurts β it didn't do the dithering properly, because it treated the PGM input samples as if they were directly proportional to light intensity, when actually they're gamma-adjusted. She was doing the math wrong the entire time. π slay? not slay, unfortunately. π
pamditherbw is backward compatible with pgmtopbm, except that it:
- does the correct gamma adjustments. β¨ (finally!)
- produces PAM output instead of PBM. (Modern Netpbm programs that accept PBM input also accept PAM input, but if you need actual PBM, you can use
pamtopnmwithpamditherbw.)
So the move is: use the manual for pamditherbw for pgmtopbm, except ignore anything that says it was added after Netpbm Release 10.23, and ignore any options that are not shown in the synopsis above. Like, read it, but read it with a filter on. Filtered reading. Iykyk. πΈ
Even though pgmtopbm is mostly obsolete, the simple threshold method (specified by -threshold) is an exception. She's the one surviving member of the group chat. Unlike the other conversion methods, gamma-adjustment is not an issue with simple thresholding, and pgmtopbm can produce PBM output directly. π That said β note that even in this basic mode of operation, pgmtopbm may produce output which is slightly different from what pamditherbw does, because of differences in internal calculation. Slightly different. Off by a vibe. Just a heads up. β οΈ
And if you just want to convert a PGM image with maxval 1 to PBM, use pamtopnm(1). That's the one for that job, bestie, don't make it complicated. π
β¨ SEE ALSO β¨
pamditherbw(1)pamtopnm(1)pbmtopgm(1)pamthreshold(1)pbmreduce(1)pgm(1)pbm(1)
the whole friend group, respectfully. π
β¨ AUTHOR β¨
Copyright (C) 1989 by Jef Poskanzer.
(the original icon, honestly π«Ά)
β¨ 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/pgmtopbm.html
π cute sign-off time: this page is from the netpbm documentation, dated 17 July 2020, and it's the manual forPgmtopbmβ the convert-a-PGM-to-PBM girlie who retired in 2004 and now lives in the Netpbm archives. go usepamditherbwinstead, bestie, she's thriving. π β¨π
π¦ 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