Penguin
Annotated edit history of pnmscale(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmscale
2 !!!pnmscale
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 SEE ALSO
7 AUTHOR
8 ----
9 !!NAME
10
11
12 pnmscale - scale a PNM image
13 !!SYNOPSIS
14
15
16 __pnmscale__ ''scale_factor'' [[''pnmfile'']__
17 pnmscale -reduce__ ''reduction_factor''
18 [[''pnmfile'']__
19 pnmscale__ [[{__-xsize=__''cols'' |
20 __-width=__''cols'' | __-xscale=__''factor''}]
21 [[{__-ysize=__''rows'' | __-height=__''rows'' |
22 __-yscale=__''factor''}] [[''pnmfile'']__
23 pnmscale -xysize__ ''cols rows''
24 [[''pnmfile'']__
25 pnmscale -pixels__ ''n'' [[''pnmfile'']
26
27
28 Miscellaneous options:__
29 -verbose__
30
31
32 Minimum unique abbreviation of option is
33 acceptable.
34 !!DESCRIPTION
35
36
37 Reads a PBM, PGM, or PPM image as input, scales it by the
38 specified factor or factors and produces a PGM or PPM image
39 as output. If the input file is in color (PPM), the output
40 will be too, otherwise it will be grayscale (PGM). This is
41 true even if the input is a black and white bitmap (PBM),
42 because the process of scaling can turn a combination of
43 black and white pixels into a gray pixel.
44
45
46 If you want PBM output, use __pgmtopbm__ to convert
47 __pnmscale__'s output to PBM. Also consider
48 __pbmreduce__.
49
50
51 You can both enlarge (scale factor
52
53
54 When you specify an absolute size or scale factor for both
55 dimensions, __pnmscale__ scales each dimension
56 independently without consideration of the aspect
57 ratio.
58
59
60 If you specify one dimension as a pixel size and don't
61 specify the other dimension, __pnmscale__ scales the
62 unspecified dimension to preserve the aspect
63 ratio.
64
65
66 If you specify one dimension as a scale factor and don't
67 specify the other dimension, __pnmscale__ leaves the
68 unspecified dimension unchanged from the input.
69
70
71 If you specify the ''scale_factor'' parameter instead of
72 dimension options, that is the scale factor for both
73 dimensions. It is equivalent to
74 __-xscale=__''scale_factor''
75 __-yscale=__''scale_factor'' .
76
77
78 Specifying the __-reduce__ ''reduction_factor'' option
79 is equivalent to specifying the ''scale_factor''
80 parameter, where ''scale_factor'' is the reciprocal of
81 ''reduction_factor''.
82
83
84 __-xysize__ specifies a bounding box. __pnmscale__
85 scales the input image to the largest size that fits within
86 the box, while preserving its aspect ratio.
87
88
89 __-pixels__ specifies a maximum total number of output
90 pixels. __pnmscale__ scales the image down to that number
91 of pixels. If the input image is already no more than that
92 many pixels, __pnmscale__ just copies it as output;
93 __pnmscale__ does not scale up with
94 __-pixels__.
95
96
97 If you enlarge by a factor of 3 or more, you should probably
98 add a ''pnmsmooth'' step; otherwise, you can see the
99 original pixels in the resulting image.
100
101
102 __PRECISION__
103
104
105 __pnmscale__ uses floating point arithmetic internally.
106 There is a speed cost associated with this. For some images,
107 you can get the acceptable results (in fact, sometimes
108 identical results) faster with __pnmscalefixed__, which
109 uses fixed point arithmetic. __pnmscalefixed__ may,
110 however, distort your image a little. See
111 __pnmscalefixed__'s man page for a complete discussion of
112 the difference.
113 !!SEE ALSO
114
115
116 pnmscalefixed(1), pnminterp(1),
117 pbmreduce(1), pnmenlarge(1),
118 pnmsmooth(1), pnmcut(1),
119 __pnm(5)__
120 !!AUTHOR
121
122
123 Copyright (C) 1989, 1991 by Jef Poskanzer.
124 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.