1Pamstretch User Manual(0) Pamstretch User Manual(0)
2
3
4
6 pamstretch - scale up a PNM or PAM image by interpolating between pix‐
7 els.
8
9
11 pamstretch
12
13 [-xscale=X]
14
15 [-yscale=Y] [-blackedge]
16
17 [-dropedge]
18
19 N
20
21 [infile]
22
23 You can use the minimum unique abbreviation of the options. You can
24 use two hyphens instead of one. You can separate an option name from
25 its value with white space instead of an equals sign.
26
27
29 This program is part of Netpbm(1).
30
31 pamstretch scales up pictures by integer values, either vertically,
32 horizontally, or both. pamstretch differs from pamscale and pamen‐
33 large in that when it inserts the additional rows and columns, instead
34 of making the new row or column a copy of its neighbor, pamstretch
35 makes the new row or column an interpolation between its neighbors. In
36 some images, this produces better looking output.
37
38 To scale up to non-integer pixel sizes, e.g. 2.5, try pamstretch-gen(1)
39 instead.
40
41 Options let you select alternative methods of dealing with the
42 right/bottom edges of the picture. Since the interpolation is done
43 between the top-left corners of the scaled-up pixels, it's not obvious
44 what to do with the right/bottom edges. The default behaviour is to
45 scale those up without interpolation (more precisely, the right edge is
46 only interpolated vertically, and the bottom edge is only interpolated
47 horizontally), but there are two other possibilities, selected by the
48 -blackedge and -dropedge options.
49
50 In the special case that the stretch factor is 1, there is no issue
51 with the right and bottom edges, the edges of the output are identical
52 to the edges of the input regardless of -blackedge and -dropedge. How‐
53 ever, before Netpbm 10.86 (March 2019), -dropedge would cause the edge
54 to be dropped even where the stretch factor was 1.
55
56
57
59 The N parameter is the scale factor. It is valid only if you don't
60 specify -xscale or -yscale. In that case, pamstretch scales in both
61 dimensions and by the scale factor N.
62
63 Before Netpbm 10.86 (March 2019), 1 was not a valid value.
64
65
66
68 In addition to the options common to all programs based on libnetpbm
69 (most notably -quiet, see
70 Common Options ⟨index.html#commonoptions⟩ ), pamstretch recognizes the
71 following command line options:
72
73
74
75 -xscale=X
76 This is the horizontal scale factor. If you don't specify this,
77 but do specify a vertical scale factor, the horizontal scale
78 factor is 1.
79
80 This option was new in Netpbm 9.21 (December 2001).
81
82
83 -yscale=Y
84 This is the vertical scale factor. If you don't specify this,
85 but do specify a horizontal scale factor, the vertical scale
86 factor is 1.
87
88 This option was new in Netpbm 9.21 (December 2001).
89
90
91 -blackedge
92 interpolate to black at right/bottom edges.
93
94
95 -dropedge
96 drop one (source) pixel at right/bottom edges. This is arguably
97 more logical than the default behaviour, but it means producing
98 output which is a slightly odd size.
99
100
101
102
104 Usually produces fairly ugly output for PBMs. For most PBM input you'll
105 probably want to reduce the `noise' first using something like pnmnl‐
106 filt(1).
107
108
110 pamstretch-gen(1), pamenlarge(1), pamscale(1), pnmnlfilt(1)
111
112
114 Russell Marks (russell.marks@ntlworld.com).
115
117 This manual page was generated by the Netpbm tool 'makeman' from HTML
118 source. The master documentation is at
119
120 http://netpbm.sourceforge.net/doc/pamstretch.html
121
122netpbm documentation 02 February 2019 Pamstretch User Manual(0)