1Pnmscalefixed User Manual(0)                      Pnmscalefixed User Manual(0)
2
3
4

NAME

6       pnmscalefixed - scale a PNM file quickly
7
8

DESCRIPTION

10       This program is part of Netpbm(1).
11
12       pnmscalefixed  is  like pamscale except that it uses fixed point arith‐
13       metic internally instead of floating  point,  which  may  make  it  run
14       faster.   In  turn,  it is less accurate and may distort the image.  It
15       also lacks many of the features of pamscale.
16
17       Use the pamscale user manual with pnmscalefixed.   This  document  only
18       describes  the difference.  Avoid any feature mentioned in the pamscale
19       manual as not existing before Netpbm 9.9.
20
21       pnmscalefixed uses fixed point 12 bit arithmetic.   By  contrast,  pam‐
22       scale uses floating point arithmetic which on most machines is probably
23       24 bit precision.  This makes pnmscalefixed run faster (30%  faster  in
24       one experiment), but the imprecision can cause distortions at the right
25       and bottom edges.
26
27       The distortion takes the following form: One pixel from the edge of the
28       input  is  rendered  larger  in  the  output  than  the  scaling factor
29       requires.  Consequently, the rest of the  image  is  smaller  than  the
30       scaling  factor  requires,  because the overall dimensions of the image
31       are always as requested.  This distortion will usually be very hard  to
32       see.
33
34       pnmscalefixed  with  the  -verbose option tells you how much distortion
35       there is.
36
37       The amount of distortion depends on the size of the input image and how
38       close the scaling factor is to an integral 1/4096th.
39
40       If  the scaling factor is an exact multiple of 1/4096, there is no dis‐
41       tortion.  So, for example doubling or halving an image causes  no  dis‐
42       tortion.   But  reducing it or enlarging it by a third would cause some
43       distortion.  To consider an extreme case, scaling a 100,000  row  image
44       down  to 50,022 rows would create an output image with all of the input
45       squeezed into the top 50,000 rows, and the last row of the input copied
46       into the bottom 22 rows of output.
47
48       pnmscalefixed could probably be modified to use 16 bit or better arith‐
49       metic without losing anything.  The modification  would  consist  of  a
50       single constant in the source code.  Until there is a demonstrated need
51       for that, though, the Netpbm maintainer wants to keep the safety  cush‐
52       ion afforded by the original 12 bit precision.
53
54       pnmscalefixed does not have pamscale's -nomix option.
55

DOCUMENT SOURCE

57       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
58       source.  The master documentation is at
59
60              http://netpbm.sourceforge.net/doc/pnmscalefixed.html
61
62netpbm documentation           18 November 2000   Pnmscalefixed User Manual(0)
Impressum