1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00
tldr/pages/common/pamcut.md
Antti Savolainen e7e3c0b668 batch4
2025-03-28 18:48:45 +02:00

857 B

pamcut

Cut out a rectangular region from a Netpbm image. See also: pamcrop, pamdice, pamcomp. More information: https://netpbm.sourceforge.net/doc/pamcut.html.

  • Discard the specified number of columns/rows on each side of the image:

pamcut {{[-cropl|-cropleft]}} {{value}} {{[-cropr|-cropright]}} {{value}} {{[-cropt|-croptop]}} {{value}} {{[-cropb|-cropbottom]}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}

  • Keep only the columns between the specified columns (inclusively):

pamcut {{[-l|-left]}} {{value}} {{[-ri|-right]}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}

  • Fill missing areas with black pixels if the specified rectangle does not entirely lie within the input image:

pamcut {{[-t|-top]}} {{value}} {{[-b|-bottom]}} {{value}} {{[-p|-pad]}} {{path/to/image.ppm}} > {{path/to/output.ppm}}