Linux command
pnmcrop 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Crop borders from image
pnmcrop [input.pnm] > [output.pnm]
Crop only white borders
pnmcrop -white [input.pnm] > [output.pnm]
Crop only black borders
pnmcrop -black [input.pnm] > [output.pnm]
Crop specific sides
pnmcrop -left -right [input.pnm] > [output.pnm]
说明
pnmcrop automatically detects and removes uniform-color borders from PNM images. It identifies rows and columns at the edges that consist entirely of the border color and trims them. By default it detects the border color automatically, but -white and -black force specific border colors. Individual sides can be cropped selectively with -left, -right, -top, and -bottom flags. Part of the Netpbm toolkit.
参数
- -white
- Crop white borders.
- -black
- Crop black borders.
- -left
- Crop left side only.
- -right
- Crop right side only.
- -top
- Crop top only.
- -bottom
- Crop bottom only.
- -verbose
- Show cropping information.
FAQ
What is the pnmcrop command used for?
pnmcrop automatically detects and removes uniform-color borders from PNM images. It identifies rows and columns at the edges that consist entirely of the border color and trims them. By default it detects the border color automatically, but -white and -black force specific border colors. Individual sides can be cropped selectively with -left, -right, -top, and -bottom flags. Part of the Netpbm toolkit.
How do I run a basic pnmcrop example?
Run `pnmcrop [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -white do in pnmcrop?
Crop white borders.