Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
pnmscale(1)
Edit
PageHistory
Diff
Info
LikePages
pnmscale !!!pnmscale NAME SYNOPSIS DESCRIPTION SEE ALSO AUTHOR ---- !!NAME pnmscale - scale a PNM image !!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__ Minimum unique abbreviation of option is acceptable. !!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 When you specify an absolute size or scale factor for both dimensions, __pnmscale__ scales each dimension independently without consideration of the aspect ratio. If you specify one dimension as a pixel size and don't specify the other dimension, __pnmscale__ scales the unspecified dimension to preserve the aspect ratio. If you specify one dimension as a scale factor and don't specify the other dimension, __pnmscale__ leaves the unspecified dimension unchanged from the input. If you specify the ''scale_factor'' parameter instead of dimension options, that is the scale factor for both dimensions. It is equivalent to __-xscale=__''scale_factor'' __-yscale=__''scale_factor'' . Specifying the __-reduce__ ''reduction_factor'' option is equivalent to specifying the ''scale_factor'' parameter, where ''scale_factor'' is the reciprocal of ''reduction_factor''. __-xysize__ specifies a bounding box. __pnmscale__ scales the input image to the largest size that fits within the box, while preserving its aspect ratio. __-pixels__ specifies a maximum total number of output pixels. __pnmscale__ scales the image down to that number of pixels. If the input image is already no more than that many pixels, __pnmscale__ just copies it as output; __pnmscale__ does not scale up with __-pixels__. 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. !!SEE ALSO pnmscalefixed(1), pnminterp(1), pbmreduce(1), pnmenlarge(1), pnmsmooth(1), pnmcut(1), __pnm(5)__ !!AUTHOR Copyright (C) 1989, 1991 by Jef Poskanzer. ----
15 pages link to
pnmscale(1)
:
fstopgm(1)
webcollage(1)
pbmfilters(1)
pnminterp(1)
jpegtopnm(1)
pbmreduce(1)
pgmtopbm(1)
pnm(5)
pnmenlarge(1)
pnmindex(1)
pnminterp-gen(1)
ppmshadow(1)
ppmtomitsu(1)
sldtoppm(1)
Man1p
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.