Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/sys/doc/netpbm/ms/pnmsmooth.ms

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TL
Pnmsmooth User Manual
.SH 1
pnmsmooth
.LP
Updated: 4 December 1994
.br
Table Of Contents
.SH 2
NAME
.LP
pnmsmooth - smooth out an image
.SH 2
SYNOPSIS
.LP
\fBpnmsmooth\fR
[\fB-width=\fR\fIcols\fR]
[\fB-height=\fR\fIrows\fR]
[\fB-dump\fR=\fIdumpfile\fR]
[\fIpnmfile\fR]
.LP
Deprecated backward-compatibility option:
[\fB-size\fR]
.LP
Minimum unique abbreviation of option 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.
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
\fBpnmsmooth\fR smoothes out an image by replacing each pixel with
the average of its width X height neighbors.  It is implemented as a
progam that generates a PGM convolution matrix and then invokes
\fBpnmconvol\fR with it.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-width=\fR\fIcols\fR"
.IP "\fB-height\fR=\fIrows\fR"
These options specify the dimensions of the convolution matrix.
Default dimensions are 3 wide and 3 high.  Each dimension must be odd.
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 \fBpamdepth\fR to increase the maxval if necessary).
.LP
These options were new in Netpbm 10.32 (February 2006).  Before that,
use \fB-size\fR.
.IP "\fB-size\fR"
This deprecated option exists in current Netpbm for backward
compatibility.  It was obsoleted by \fB-width\fR and \fB-height\fR
in Netpbm 10.32 (February 2006).
.LP
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 \fB-width\fR and \fB-height\fR option values.  The third
(optional) program argument is the input file name.
.LP
In reality, in old \fBpnmsmooth\fR, the width and height are two
values of the \fB-size\fR option, but the modern Netpbm command syntax
paradigm doesn't allow an option with multiple values, so instead
\fB-size\fR 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 \fBpnmsmooth\fR as in old \fBpnmsmooth\fR:
.DS L
\f(CW     pnmsmooth -size 5 5 infile.ppm >outfile.ppm
\fR.DE
.IP "\fB-dump=\fR\fIdumpfile\fR"
This options makes \fBpnmsmooth\fR only generate and save the
convolution file.  It does not invoke \fBpnmconvol\fR and does not
produce an output image.
.RE
.SH 2
SEE ALSO
.LP
pnmconvol,
pnm
.SH 2
HISTORY
.LP
.LP
Before Netpbm 10.32 (February 2006), \fBpnmsmooth\fR did not use
the modern Netpbm command line parser, so had an unconventional command line
syntax.  Most importantly, you could not use an equal size or double
hyphens in the options.
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
SEE ALSO
.IP \(bu
HISTORY
.LP

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.