SYNOPSIS
pnmscale scale_factor [pnmfile]pnmscale -reduce reduction_factor [pnmfile]
pnmscale [{-xsize=cols | -width=cols | -xscale=factor}] [{-ysize=rows | -height=rows | -yscale=factor}] [pnmfile]
pnmscale -xysize cols rows [pnmfile]
pnmscale -pixels n [pnmfile]
Miscellaneous options:
-verbose -nomix
Minimum unique abbreviation of option is acceptable. You may use double hypens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value.
DESCRIPTION
Reads a PBM, PGM, or PPM image as input, scales it by the specified factor or factors and produces a PGM or PPM image as output. If the input file is in color (PPM), the output will be too, otherwise it will be grayscale (PGM). This is true even if the input is a black and white bitmap (PBM), because the process of scaling can turn a combination of black and white pixels into a gray pixel.
If you want PBM output, use pgmtopbm to convert pnmscale's output to PBM. Also consider pbmreduce.
You can both enlarge (scale factor > 1) and reduce (scale factor < 1).
If you enlarge by a factor of 3 or more, you should probably add a pnmsmooth step; otherwise, you can see the original pixels in the resulting image.
PRECISION
pnmscale uses floating point arithmetic internally. There is a speed cost associated with this. For some images, you can get the acceptable results (in fact, sometimes identical results) faster with pnmscalefixed, which uses fixed point arithmetic. pnmscalefixed may, however, distort your image a little. See pnmscalefixed's man page for a complete discussion of the difference.
AUTHOR
Copyright (C) 1989, 1991 by Jef Poskanzer.