← 返回命令列表

Linux command

pnmrotate 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Rotate image

pnmrotate [45] [input.pnm] > [output.pnm]

Rotate with background color

pnmrotate -background [white] [30] [input.pnm] > [output.pnm]

Rotate without anti-aliasing

pnmrotate -noantialias [30] [input.pnm] > [output.pnm]

说明

pnmrotate rotates PNM images by an arbitrary angle specified in degrees (between -90 and 90, measured counter-clockwise). The output image is enlarged as needed to contain the full rotated result, with new areas filled by the background color. Anti-aliasing is applied by default for smooth edges; use -noantialias to disable it for faster processing or when working with binary images. For rotations that are multiples of 90 degrees, use pamflip instead. Part of the Netpbm toolkit.

参数

-background _color_
Background fill color. By default, pnmrotate selects what appears to be the background color of the original image.
-noantialias
Disable anti-aliasing. Simply moves pixels instead of synthesizing output pixels from multiple input pixels.

FAQ

What is the pnmrotate command used for?

pnmrotate rotates PNM images by an arbitrary angle specified in degrees (between -90 and 90, measured counter-clockwise). The output image is enlarged as needed to contain the full rotated result, with new areas filled by the background color. Anti-aliasing is applied by default for smooth edges; use -noantialias to disable it for faster processing or when working with binary images. For rotations that are multiples of 90 degrees, use pamflip instead. Part of the Netpbm toolkit.

How do I run a basic pnmrotate example?

Run `pnmrotate [45] [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -background _color_ do in pnmrotate?

Background fill color. By default, pnmrotate selects what appears to be the background color of the original image.