1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-03 13:55:24 +02:00
tldr/pages/common/pnmcrop.md
Juri Dispan a47af264de
pamcomp, pnmcomp, pnmconvol, pnmcrop, pnmgamma: add pages (#12197)
* pamcomp, pnmcomp, pnmconvol, pnmcrop, pnmgamma: add pages

* Update pages/common/pnmgamma.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-02-06 23:12:53 +08:00

20 lines
843 B
Markdown

# pnmcrop
> Crop PNM images.
> More information: <https://netpbm.sourceforge.net/doc/pnmcrop.html>.
- Remove white borders on a PNM image:
`pnmcrop -white {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Remove borders of the specified color that are on the top and left side of the image:
`pnmcrop -bg-color {{color}} -top -left {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Determine the color of the borders to be removed by the color of the pixel in the specified corner:
`pnmcrop -bg-corner {{topleft|topright|bottomleft|bottomright}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Leave a border with a width of `n` pixels. Additionally, specify the behaviour if the image is entirely made out of background:
`pnmcrop -margins {{n}} -blank-image {{pass|minimize|maxcrop}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`