1Pamenlarge User Manual(0) Pamenlarge User Manual(0)
2
3
4
6 pamenlarge - Enlarge a Netpbm image N times
7
8
10 pamenlarge [-scale=integer] [-xscale=integer] [-yscale=integer] [file‐
11 name]
12
13 pamenlarge N [pnmfile]
14
15
16
18 This program is part of Netpbm(1).
19
20 pamenlarge reads a Netpbm image as input, replicates its pixels N
21 times, and produces a Netpbm image as output. The output is the same
22 type of image as the input.
23
24 If you enlarge by a factor of 3 or more, you should probably add a
25 pnmsmooth step; otherwise, you can see the original pixels in the
26 resulting image.
27
28 For PBM images, pamenlarge uses special fast algorithms for scale fac‐
29 tors up to 10. For larger factors, it uses a simple but slow algo‐
30 rithm. As a result, you can often get a significantly faster scale by
31 running pamenlarge multiple times. For example, enlarging by 3 and
32 then by 5 is faster than enlarging once by 15. And because the algo‐
33 rithms are different for the different scale factors, some faster than
34 others, the order matters too. For example, the following examples all
35 produce the same output -- an image 15 times bigger on edge than the
36 input -- but at different speeds, each being faster than the one
37 before.
38
39 $ pamenlarge -scale=15 test.pbm
40 $ pamenlarge -scale=5 test.pbm | pamenlarge -scale=3
41 $ pamenlarge -scale=3 test.pbm | pamenlarge -scale=5
42
43 The special fast cases for factors up to 10 have existed since Release
44 10.50 (March 2010). The special cases for 1, 2, 3, and 5 go back to
45 Release 10.41 (December 2007). Before 10.41, there are no special
46 scale factors and PBM enlargement is significantly slower than today
47 for all scale factors.
48
49 pamenlarge can enlarge only by integer factors. The slower but more
50 general pamscale can enlarge or reduce by arbitrary factors. pamscale
51 allows you to enlarge by resampling, which gives you smoother enlarge‐
52 ments. But it is much slower.
53
54 pamstretch is another enlarging program that enlarges by integer fac‐
55 tors. It does a simple kind of resampling that gives you a smoothed
56 enlargement with less computational cost.
57
58 pbmreduce can reduce by integer factors, but only for PBM images.
59
60
62 As with most Netpbm programs, you can give the input file name as an
63 argument or omit that argument and have it come from Standard Input
64 (and you can specify '-' for the argument to specify Standard Input
65 explicitly).
66
67 You can also specify the scale factor as an argument, for backward com‐
68 patibility, but the preferred way to do that is with a -scale option,
69 because it is easier to remember and read that way. The scale factor
70 argument goes before the file name argument.
71
72
73
74
75
77 -scale=integer
78
79 -xscale=integer
80
81 -yscale=integer
82 These specify the scale factor. -xscale specifies the horizon‐
83 tal scale factor; -yscale specifies the vertical scale factor
84 and -scale specifies both.
85
86 If you specify -xscale but not -yscale, pamenlarge does not
87 scale vertically (i.e. the vertical scale factor is 1). The
88 converse applies if you specify -yscale and not -xscale.
89
90 You cannot specify -scale and also -xscale or yscale.
91
92 You must specify at least one of these options, unless you use
93 the deprecaated method of specifying the scale factor via argu‐
94 ment.
95
96 These options were all new in Netpbm 10.86 (March 2019). Before
97 that, use the scale argument.
98
99
100
101
102
104 pamenlarge was new in Netpbm 10.25 (October 2004). It is designed as a
105 replacement for pnmenlarge by Jef Poskanzer, which was in Pbmplus as
106 far back as 1989. The major difference is that pamenlarge can enlarge
107 PAM format images in addition to PNM.
108
109
110
112 pbmreduce(1), pamscale(1), pamstretch(1), pbmpscale(1), pnmsmooth(1),
113 pnm(1)
114
115
117 Copyright (C) 1989 by Jef Poskanzer.
118
120 This manual page was generated by the Netpbm tool 'makeman' from HTML
121 source. The master documentation is at
122
123 http://netpbm.sourceforge.net/doc/pamenlarge.html
124
125netpbm documentation 07 January 2019 Pamenlarge User Manual(0)