Linux command
pnmscale 命令
趣味
Uses pipes, overwrite, or deletion. Check paths and options first.
命令示例
Scale by factor
pnmscale [0.5] [input.pnm] > [output.pnm]
Scale to specific width
pnmscale -width [640] [input.pnm] > [output.pnm]
Scale to specific dimensions
pnmscale -width [800] -height [600] [input.pnm] > [output.pnm]
Scale by X and Y factors
pnmscale -xscale [2] -yscale [1.5] [input.pnm] > [output.pnm]
说明
pnmscale scales PNM images up or down. It uses pixel mixing for smooth results when scaling down. This command was obsoleted by pamscale as of Netpbm 10.20 (January 2004) and removed in Netpbm 10.46 (March 2009). Use pamscale for new work, which is backward-compatible and supports PAM images. Part of the Netpbm toolkit.
参数
- -width _n_
- Output width.
- -height _n_
- Output height.
- -xscale _n_
- Horizontal scale factor.
- -yscale _n_
- Vertical scale factor.
- -reduce _n_
- Reduce by integer factor.
- -xysize _x_ _y_
- Fit within dimensions (synonym for -xyfit in pamscale).
- -pixels _n_
- Scale to a given total number of pixels.
FAQ
What is the pnmscale command used for?
pnmscale scales PNM images up or down. It uses pixel mixing for smooth results when scaling down. This command was obsoleted by pamscale as of Netpbm 10.20 (January 2004) and removed in Netpbm 10.46 (March 2009). Use pamscale for new work, which is backward-compatible and supports PAM images. Part of the Netpbm toolkit.
How do I run a basic pnmscale example?
Run `pnmscale [0.5] [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -width _n_ do in pnmscale?
Output width.