PNMSMOOTH(1)
π PNMSMOOTH(1) β the Pnmsmooth User Manual, but make it make sense π
okay bestie, welcome to pnmsmooth, part of the iconic Netpbm(1) family. this is the manual page, rewritten with the energy it deserves. grab a boba, we're doing signal processing β¨
β¨ NAME β¨
pnmsmooth β smooth out an image π«§
πΈ SYNOPSIS πΈ
pnmsmooth [-width=cols] [-height=rows] [pnmfile] [-size]
real talk, the syntax has some manners built in:
- Minimum unique abbreviations of options is acceptable β so you can be lazy, it's fine π
- You may use double hyphens instead of single hyphen to denote options
- You may use white space in place of the equals sign to separate an option name from its value
π¦ DESCRIPTION π¦
This program is part of Netpbm(1).
pnmsmooth smooths out an image by replacing each pixel with the average of its width X height neighbors. that's it, that's the whole glow-up π€
and the way that it does it?? it's literally implemented as a program that invokes pnmconvol with an appropriate convolution matrix. it's giving delegation. it's giving main character energy by not doing the math itself πβ¨
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pnmsmooth recognizes the following command line options:
-width=cols-height=rowsβ These options specify the dimensions of the convolution matrix. Default dimensions are 3 wide and 3 high.
Before Netpbm 10.49 (December 2009), the maximum size of the convolution matrix is limited by the maxval of the image such that width * height * 2 must not exceed the maxval. (use pamdepth to increase the maxval if necessary).
These options were new in Netpbm 10.32 (February 2006). Before that, use -size.
-sizeβ This deprecated option exists in current Netpbm for backward compatibility. It was obsoleted by-widthand-heightin Netpbm 10.32 (February 2006). (yes, it's giving legacy. she's still here for the nostalgia π°οΈ)
When you use this option, the first two program arguments are the width and height, respectively, of the convolution matrix and do the same thing as the -width and -height option values. The third (optional) program argument is the input file name.
In reality, in old pnmsmooth, the width and height are two values of the -size option, but the modern Netpbm command syntax paradigm doesn't allow an option with multiple values, so instead -size is an option with no value and width and height are program arguments. That has the fortunate effect of making the following command mean the same in current pnmsmooth as in old pnmsmooth:
pnmsmooth -size 5 5 infile.ppm >outfile.ppm
-dump=dumpfileβ This options makespnmsmoothonly show you the convolution matrix. It writes to Standard Output apnmconvol -matrixoption value that represents the matrix. It does not invokepnmconvoland does not produce an output image. peek behind the curtain, no notes π
Before Netpbm 10.49 (December 2009), this option is rather different. It takes a file name as a value, and it writes to that file the convolution matrix as a PGM file (as used to be the normal input for pnmconvol).
π SEE ALSO π
pnmconvol(1)pnm(1)
go read your siblings, they're iconic too π«Ά
π HISTORY π
lore drop incoming. this is the entire character arc. buckle up π
Before Netpbm 10.32 (February 2006), pnmsmooth did not use the modern Netpbm command line parser, so had an unconventional command line syntax. Most importantly, you could not use an equal sign or double hyphens in the options. wild times, honestly π
Before Netpbm 10.49 (December 2009), there was a -dump option. This strange option caused pnmsmooth not to do any smoothing or produce any output image but instead write the convolution matrix it would have used, as PGM file such as pnmconvol used to use, to a file you specify. The idea was you could then use that file with a separate invocation of pnmconvol.
Then, in Netpbm 10.49, there was a rather different -dump option with a similar purpose: It caused pnmsmooth to write to Standard Error a string suitable as a value for the pnmconvol -matrix option (an option that was new in Netpbm 10.49).
But in Netpbm 10.51 (June 2010), pnmconvol started using the even newer pnmconvol -normalize option (new in 10.50), which made specifying the convolution matrix for the kind of smoothing that pnmsmooth does trivial, so -dump disappeared from pnmsmooth.
(There were also ease of implementation issues that kept us from simply keeping the original -dump around for backward compatibility: As we modified pnmsmooth to take advantage of the new features of pnmconvol, which pnmsmooth uses internally, the information needed to implement -dump was no longer available in the program).
rip -dump, you would've loved being deprecated properly ππΈ
π§ 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/pnmsmooth.html
and that's the whole page, bestie!!! you ate that π β¨
this has been netpbm documentation, 19 December 2009, and yes, the lovely title at the bottom really is Pnmsmooth User Manual(1) β no cap, stay smooth π«Άπ
π¦ where this page comes from
- 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