1Pnmsmooth User Manual(0)                              Pnmsmooth User Manual(0)
2
3
4

NAME

6       pnmsmooth - smooth out an image
7
8

SYNOPSIS

10       pnmsmooth [-width=cols] [-height=rows] [pnmfile] [-size]
11
12       Minimum  unique  abbreviations  of  options is acceptable.  You may use
13       double hyphens instead of single hyphen to denote options.  You may use
14       white space in place of the equals sign to separate an option name from
15       its value.
16
17

DESCRIPTION

19       This program is part of Netpbm(1).
20
21       pnmsmooth smoothes out an image by replacing each pixel with the  aver‐
22       age  of  its  width  X height neighbors.  It is implemented as a progam
23       that invokes pnmconvol with an appropriate convolution matrix.
24
25

OPTIONS

27       In addition to the options common to all programs  based  on  libnetpbm
28       (most notably -quiet, see
29        Common  Options ⟨index.html#commonoptions⟩ ), pnmsmooth recognizes the
30       following command line options:
31
32
33
34       -width=cols
35
36       -height=rows
37              These options specify the dimensions of the convolution  matrix.
38              Default dimensions are 3 wide and 3 high.
39
40              Before  Netpbm  10.49  (December  2009), the maximum size of the
41              convolution matrix is limited by the maxval of  the  image  such
42              that  width  *  height  *  2  must  not exceed the maxval.  (use
43              pamdepth to increase the maxval if necessary).
44
45              These options were new in Netpbm 10.32 (February 2006).   Before
46              that, use -size.
47
48
49       -size  This  deprecated  option  exists  in current Netpbm for backward
50              compatibility.  It was obsoleted by -width and -height in Netpbm
51              10.32 (February 2006).
52
53              When  you  use  this option, the first two program arguments are
54              the width and height, respectively, of  the  convolution  matrix
55              and  do  the same thing as the -width and -height option values.
56              The third (optional) program argument is the input file name.
57
58              In reality, in old pnmsmooth, the width and height are two  val‐
59              ues  of  the  -size option, but the modern Netpbm command syntax
60              paradigm doesn't  allow  an  option  with  multiple  values,  so
61              instead  -size  is  an option with no value and width and height
62              are program arguments.  That has the fortunate effect of  making
63              the  following  command mean the same in current pnmsmooth as in
64              old pnmsmooth:
65                   pnmsmooth -size 5 5 infile.ppm >outfile.ppm
66
67
68       -dump=dumpfile
69              This options makes  pnmsmooth  only  show  you  the  convolution
70              matrix.  It writes to Standard Output a pnmconvol -matrix option
71              value that represents the matrix.  It does not invoke  pnmconvol
72              and does not produce an output image.
73
74              Before  Netpbm 10.49 (December 2009), this option is rather dif‐
75              ferent.  It takes a file name as a value, and it writes to  that
76              file  the  convolution  matrix  as a PGM file (as used to be the
77              normal input for pnmconvol).
78
79
80
81
82
83

SEE ALSO

85       pnmconvol(1), pnm(1)
86
87

HISTORY

89       Before Netpbm 10.32 (February 2006), pnmsmooth did not use  the  modern
90       Netpbm  command line parser, so had an unconventional command line syn‐
91       tax.  Most importantly, you could not  use  an  equal  sign  or  double
92       hyphens in the options.
93
94       Before  Netpbm  10.49  (December 2009), there was a -dump option.  This
95       strange option caused pnmsmooth not to do any smoothing or produce  any
96       output  image  but  instead  write the convolution matrix it would have
97       used, as PGM file such as pnmconvol used to use, to a file you specify.
98       The idea was you could then use that file with a separate invocation of
99       pnmconvol.
100
101       Then, in Netpbm 10.49, there was a rather different -dump option with a
102       similar  purpose:  It  caused  pnmsmooth  to  write to Standard Error a
103       string suitable as a value for the pnmconvol -matrix option (an  option
104       that was new in Netpbm 10.49).
105
106       But in Netpbm 10.51 (June 2010), pnmconvol started using the even newer
107       pnmconvol -normalize option (new in 10.50), which made  specifying  the
108       convolution  matrix for the kind of smoothing that pnmsmooth does triv‐
109       ial, so -dump disappeared from pnmsmooth.
110
111       (There were also ease of implementation issues that kept us from simply
112       keeping  the  original  -dump  around for backward compatibility: As we
113       modified pnmsmooth to take advantage of the new features of  pnmconvol,
114       which  pnmsmooth  uses  internally, the information needed to implement
115       -dump was no longer available in the program).
116

DOCUMENT SOURCE

118       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
119       source.  The master documentation is at
120
121              http://netpbm.sourceforge.net/doc/pnmsmooth.html
122
123netpbm documentation           19 December 2009       Pnmsmooth User Manual(0)
Impressum