pnmsmooth1
Smooth out an image
Usage
pnmsmooth [-width=cols] [-height=rows] [pnmfile] [-size]
Minimum unique abbreviations of options is acceptable. 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.
Overview
This program is part of Netpbm(1) .
pnmsmooth smoothes out an image by replacing each pixel with the average of its width X height neighbors. It is implemented as a program that invokes pnmconvol with an appropriate convolution matrix.
Options
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see
Common Options ⟨index.html#commonoptions⟩ ), 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
pamdepthto 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).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
-widthand-heightoption 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-sizeoption, but the modern Netpbm command syntax paradigm doesn't allow an option with multiple values, so instead-sizeis 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 currentpnmsmoothas in oldpnmsmooth:pnmsmooth -size 5 5 infile.ppm >outfile.ppm
-
-dump=dumpfile -
This options makes
pnmsmoothonly 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.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).
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
Releases
16 releases since Debian 2.0 (Hamm); the text changed 4 times.
-dump since Debian 3.0 (Woody);
-height since Debian 12 (Bookworm);
-size since Debian 12 (Bookworm);
-width since Debian 12 (Bookworm).