1\ 2.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. 3.\" Do not hand-hack it! If you have bug fixes or improvements, please find 4.\" the corresponding HTML page on the Netpbm website, generate a patch 5.\" against that, and send it to the Netpbm maintainer. 6.TH "Pnmsmooth User Manual" 0 "19 December 2009" "netpbm documentation" 7 8.SH NAME 9 10pnmsmooth - smooth out an image 11 12.UN synopsis 13.SH SYNOPSIS 14 15\fBpnmsmooth\fP 16[\fB-width=\fP\fIcols\fP] [\fB-height=\fP\fIrows\fP] 17[\fIpnmfile\fP] [\fB-size\fP] 18.PP 19Minimum unique abbreviations of options is acceptable. You may use double 20hyphens instead of single hyphen to denote options. You may use white 21space in place of the equals sign to separate an option name from its value. 22 23.UN description 24.SH DESCRIPTION 25.PP 26This program is part of 27.BR "Netpbm" (1)\c 28\&. 29.PP 30\fBpnmsmooth\fP smoothes out an image by replacing each pixel with the 31average of its width X height neighbors. It is implemented as a progam that 32invokes \fBpnmconvol\fP with an appropriate convolution matrix. 33 34.UN options 35.SH OPTIONS 36 37 38.TP 39\fB-width=\fP\fIcols\fP 40.TP 41\fB-height=\fP\fIrows\fP 42These options specify the dimensions of the convolution matrix. 43Default dimensions are 3 wide and 3 high. 44.sp 45Before Netpbm 10.49 (December 2009), the maximum size of the convolution 46matrix is limited by the maxval of the image such that width * height * 2 must 47not exceed the maxval. (use \fBpamdepth\fP to increase the maxval if 48necessary). 49.sp 50These options were new in Netpbm 10.32 (February 2006). Before that, 51use \fB-size\fP. 52 53.TP 54\fB-size\fP 55This deprecated option exists in current Netpbm for backward 56compatibility. It was obsoleted by \fB-width\fP and \fB-height\fP 57in Netpbm 10.32 (February 2006). 58.sp 59When you use this option, the first two program arguments are the width 60and height, respectively, of the convolution matrix and do the same thing 61as the \fB-width\fP and \fB-height\fP option values. The third 62(optional) program argument is the input file name. 63.sp 64In reality, in old \fBpnmsmooth\fP, the width and height are two 65values of the \fB-size\fP option, but the modern Netpbm command syntax 66paradigm doesn't allow an option with multiple values, so instead 67\fB-size\fP is an option with no value and width and height are program 68arguments. That has the fortunate effect of making the following command 69mean the same in current \fBpnmsmooth\fP as in old \fBpnmsmooth\fP: 70.nf 71\f(CW 72 pnmsmooth -size 5 5 infile.ppm >outfile.ppm 73\fP 74.fi 75 76.TP 77\fB-dump=\fP\fIdumpfile\fP 78This options makes \fBpnmsmooth\fP only show you the 79convolution matrix. It writes to Standard Output a \fBpnmconvol\fP 80\fB-matrix\fP option value that represents the matrix. It does not 81invoke \fBpnmconvol\fP and does not produce an output image. 82.sp 83Before Netpbm 10.49 (December 2009), this option is rather different. 84It takes a file name as a value, and it writes to that file the 85convolution matrix as a PGM file (as used to be the normal input for 86\fBpnmconvol\fP). 87 88 89 90 91 92.UN seealso 93.SH SEE ALSO 94.BR "pnmconvol" (1)\c 95\&, 96.BR "pnm" (5)\c 97\& 98 99.UN history 100.SH HISTORY 101.PP 102Before Netpbm 10.32 (February 2006), \fBpnmsmooth\fP did not use 103the modern Netpbm command line parser, so had an unconventional command line 104syntax. Most importantly, you could not use an equal sign or double 105hyphens in the options. 106.PP 107Before Netpbm 10.49 (December 2009), there was a \fB-dump\fP option. 108This strange option caused \fBpnmsmooth\fP not to do any smoothing or 109produce any output image but instead write the convolution matrix it 110would have used, as PGM file such as \fBpnmconvol\fP used to use, to 111a file you specify. The idea was you could then use that file with a 112separate invocation of \fBpnmconvol\fP. 113.PP 114Then, in Netpbm 10.49, there was a rather different \fB-dump\fP 115option with a similar purpose: It caused \fBpnmsmooth\fP to write to 116Standard Error a string suitable as a value for the \fBpnmconvol\fP 117\fB-matrix\fP option (an option that was new in Netpbm 10.49). 118.PP 119But in Netpbm 10.51 (June 2010), \fBpnmconvol\fP started using the even 120newer \fBpnmconvol\fP \fB-normalize\fP option (new in 10.50), which made 121specifying the convolution matrix for the kind of smoothing that 122\fBpnmsmooth\fP does trivial, so \fB-dump\fP disappeared from 123\fBpnmsmooth\fP. 124.PP 125(There were also ease of implementation issues that kept us from simply 126keeping the original \fB-dump\fP around for backward compatibility: As we 127modified \fBpnmsmooth\fP to take advantage of the new features of 128\fBpnmconvol\fP, which \fBpnmsmooth\fP uses internally, the information 129needed to implement \fB-dump\fP was no longer available in the program). 130.SH DOCUMENT SOURCE 131This manual page was generated by the Netpbm tool 'makeman' from HTML 132source. The master documentation is at 133.IP 134.B http://netpbm.sourceforge.net/doc/pnmsmooth.html 135.PP