Debian Codegraph @

upstream/debian-unstable/man1/pnmscalefixed.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pnmscalefixed User Manual" 1 "01 July 2020" "netpbm documentation"
7
8 .SH NAME
9
10 pnmscalefixed - scale a PNM file quickly
11
12 .UN description
13 .SH DESCRIPTION
14 .PP
15 This program is part of
16 .BR "Netpbm" (1)\c
17 \&.
18
19 \fBpnmscalefixed\fP is like \fBpamscale\fP except that
20 it uses fixed point arithmetic internally instead of floating point,
21 which may make it run faster. In turn, it is less accurate and may
22 distort the image. It also lacks many of the features of \fBpamscale\fP.
23 .PP
24 Use the \fBpamscale\fP user manual with \fBpnmscalefixed\fP. This
25 document only describes the difference. Avoid any feature mentioned in
26 the \fBpamscale\fP manual as not existing before Netpbm 9.9.
27 .PP
28 \fBpnmscalefixed\fP uses fixed point 12 bit arithmetic. By
29 contrast, \fBpamscale\fP uses floating point arithmetic which on most
30 machines is probably 24 bit precision. This makes
31 \fBpnmscalefixed\fP run faster (30% faster in one experiment), but
32 the imprecision can cause distortions at the right and bottom edges.
33 .PP
34 The distortion takes the following form: One pixel from the edge of
35 the input is rendered larger in the output than the scaling factor
36 requires. Consequently, the rest of the image is smaller than the
37 scaling factor requires, because the overall dimensions of the image
38 are always as requested. This distortion will usually be very hard to
39 see.
40 .PP
41 \fBpnmscalefixed\fP with the \fB-verbose\fP option tells you how
42 much distortion there is.
43 .PP
44 The amount of distortion depends on the size of the input image and how
45 close the scaling factor is to an integral 1/4096th.
46 .PP
47 If the scaling factor is an exact multiple of 1/4096, there is no
48 distortion. So, for example doubling or halving an image causes no
49 distortion. But reducing it or enlarging it by a third would cause
50 some distortion. To consider an extreme case, scaling a 100,000 row
51 image down to 50,022 rows would create an output image with all of the
52 input squeezed into the top 50,000 rows, and the last row of the input
53 copied into the bottom 22 rows of output.
54 .PP
55 \fBpnmscalefixed\fP could probably be modified to use 16 bit or
56 better arithmetic without losing anything. The modification would
57 consist of a single constant in the source code. Until there is a
58 demonstrated need for that, though, the Netpbm maintainer wants to
59 keep the safety cushion afforded by the original 12 bit precision.
60 .PP
61 \fBpnmscalefixed\fP does not have \fBpamscale\fP's \fB-nomix\fP
62 option.
63
64 .UN options
65 .SH OPTIONS
66 .PP
67 In addition to the options common to all programs based on libnetpbm
68 (most notably \fB-quiet\fP, see
69 .UR index.html#commonoptions
70 Common Options
71 .UE
72 \&), \fBpnmscalefixed\fP recognizes the following
73 command line options:
74
75
76 .TP
77 \fB-xsize\fP
78 .TP
79 \fB-width\fP
80 .TP
81 \fB-ysize\fP
82 .TP
83 \fB-height\fP
84 .TP
85 \fB-xscale\fP
86 .TP
87 \fB-yscale\fP
88 .TP
89 \fB-pixels\fP
90 .TP
91 \fB-xysize\fP
92 .TP
93 \fB-reduce\fP
94 .sp
95 These options determine the scale factors. See the
96 .BR "\fBpamscale\fP" (1)\c
97 \& user manual for details.
98
99 .TP
100 \fB-verbose\fP
101 .sp
102 Report details of the transformation.
103
104
105 .UN history
106 .SH HISTORY
107 .PP
108 \fBpnmscalefixed\fP was originally \fBpnmscale\fP. In Netpbm 9.9
109 (November 2000) \fBpnmscale\fP was rewritten to use floating point
110 arithmetic; the former fixed point arithmetic version was renamed
111 \fBpnmscalefixed\fP.
112
113 .UN seealso
114 .SH SEE ALSO
115 .BR "pamscale" (1)\c
116 \&,
117 .BR "pamstretch" (1)\c
118 \&,
119 .BR "pamstretch-gen" (1)\c
120 \&,
121 .BR "pbmreduce" (1)\c
122 \&,
123 .BR "pbmpscale" (1)\c
124 \&,
125 .BR "pamenlarge" (1)\c
126 \&,
127 .BR "pnmscale" (1)\c
128 \&,
129 .BR "pnm" (1)\c
130 \&,
131 .BR "pam" (1)\c
132 \&
133 .SH DOCUMENT SOURCE
134 This manual page was generated by the Netpbm tool 'makeman' from HTML
135 source. The master documentation is at
136 .IP
137 .B http://netpbm.sourceforge.net/doc/pnmscalefixed.html
138 .PP