← 返回命令列表

Linux command

pnmcut 命令

文本

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

常用示例

Cut rectangular region

pnmcut [x] [y] [width] [height] [input.pnm] > [output.pnm]

Cut from top-left corner

pnmcut -left [0] -top [0] -width [100] -height [100] [input.pnm] > [output.pnm]

Cut using bottom-right

pnmcut -left [10] -top [10] -right [200] -bottom [150] [input.pnm] > [output.pnm]

Pad if outside bounds

pnmcut -pad [x] [y] [width] [height] [input.pnm] > [output.pnm]

说明

pnmcut extracts a rectangular region from a PNM image. Coordinates are zero-indexed from top-left corner. Part of Netpbm toolkit for image manipulation.

参数

-left _n_
Left column.
-right _n_
Right column.
-top _n_
Top row.
-bottom _n_
Bottom row.
-width _n_
Width in pixels.
-height _n_
Height in pixels.
-pad
Pad with black if out of bounds.

FAQ

What is the pnmcut command used for?

pnmcut extracts a rectangular region from a PNM image. Coordinates are zero-indexed from top-left corner. Part of Netpbm toolkit for image manipulation.

How do I run a basic pnmcut example?

Run `pnmcut [x] [y] [width] [height] [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -left _n_ do in pnmcut?

Left column.