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 -xscale=X
69 This is the horizontal scale factor. If you don't specify this,
70 but do specify a vertical scale factor, the horizontal scale
71 factor is 1.
72
73 This option was new in Netpbm 9.21 (December 2001).
74
75
76 -yscale=Y
77 This is the vertical scale factor. If you don't specify this,
78 but do specify a horizontal scale factor, the vertical scale
79 factor is 1.
80
81 This option was new in Netpbm 9.21 (December 2001).
82
83
84 -blackedge
85 interpolate to black at right/bottom edges.
86
87
88 -dropedge
89 drop one (source) pixel at right/bottom edges. This is arguably
90 more logical than the default behaviour, but it means producing
91 output which is a slightly odd size.
92
93
94
95
97 Usually produces fairly ugly output for PBMs. For most PBM input you'll
98 probably want to reduce the `noise' first using something like pnmnl‐
99 filt(1).
100
101
103 pamstretch-gen(1), pamenlarge(1), pamscale(1), pnmnlfilt(1)
104
105
107 Russell Marks (russell.marks@ntlworld.com).
108
110 This manual page was generated by the Netpbm tool 'makeman' from HTML
111 source. The master documentation is at
112
113 http://netpbm.sourceforge.net/doc/pamstretch.html
114
115netpbm documentation 2 Februrary 2019 Pamstretch User Manual(0)