PPMDIST(1)
π ppmdist β the Ppmdist User Manual, but make it make sense π
okay bestie, gather round, because we're about to talk about ppmdist, and she is niche but she is iconic. this is a page from the Ppmdist User Manual, filed under General Commands Manual, and honestly? it's giving "tiny tool, big opinions." π
β¨ NAME β¨
ppmdist β a simplistic grayscale assignment for machine generated, color images π¦
like. she's not fancy. she's not doing rocket science. she is doing one thing and doing it loudly.
πΈ SYNOPSIS πΈ
ppmdist
[-intensity|-frequency]
[ppmfile]
that's it. that's the whole vibe. no cap. π
π«Ά DESCRIPTION π«Ά
okay so first things first: this program is part of Netpbm(1). π§
ppmdist reads a PPM image as input and performs a simplistic grayscale assignment intended for use with grayscale or bitmap printers. yes, printers. remember paper? bestie, same. π
here's the tea tho: often conversion from ppm to pgm will yield an image with contrast too low for good printer output. not the move. so this program maximizes contrast between the gray levels output. she's a contrast maximalist. periodt. β¨
the mechanics, fr fr:
- A
ppminput of n colors is read. - And a
pgmof n gray levels is written. - The gray levels take on the values 0..n-1.
- While
maxvaltakes on n-1.
so yeah, she's remapping your whole color situation onto a staircase of grays. π
the mapping from color to stepped grayscale can be performed in order of input pixel intensity, or input pixel frequency (that's the number of repetitions, iykyk).
β οΈ lowkey important warning: this program is helpful only for images with a very small number of colors. if your image has 40,000 colors, girl, she is not the one. don't do that to her. π
π OPTIONS π
in addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), ppmdist recognizes the following command line options:
-frequencyβ sort input colors by the number of times a color appears in the input, before mapping to evenly distributed graylevels of output. π-intensityβ sort input colors by their grayscale intensity, before mapping to evenly distributed graylevels of output. this one is the default, so if you just run her with no flags, this is what you're getting bestie π
π SEE ALSO π
ppmtopgm(1), ppmhist(1), ppm(1)
go read those next, they're the friend group. π«Ά
π AUTHOR π
Copyright (C) 1993 by Dan Stromberg.
like, 1993. this tool is older than your fave's entire discography and she is STILL slaying. we love a legacy icon. π
π 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/ppmdist.html
so that's the whole page, bestie π netpbm documentation blessed us with this one back on 22 July 1992, and it's still doing its little grayscale thing. stan a low-maintenance queen. mwah. ππβ¨π¦πΈ
π¦ 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