pnmcrop(1) crop a portable anymap

SYNOPSIS

pnmcrop [-white|-black|-sides] [-left] [-right] [-top] [-bottom] [pnmfile]

All options may be abbreviated to their shortest unique prefix or specified with double hyphens.

OPTIONS

-white
Take white to be the background color. pnmcrop removes borders which are white.
-black
Take black to be the background color. pnmcrop removes borders which are black.
-sides
Determine the background color from the colors of the four corners of the input image. pnmcrop removes borders which are of the background color.

If at least three of the four corners are the same color, pnmcrop takes that as the background color. If not, pnmcrop looks for two corners of the same color in the following order, taking the first found as the background color: top, left, right, bottom. If all four corners are different colors, pnmcrop assumes an average of the four colors as the background color.

The -sides option slows pnmcrop down, as it reads the entire image to determine the background color in addition to the up to three times that it would read it without -sides.

-left
Remove any left border.
-right
Remove any right border.
-top
Remove any top border.
-bottom
Remove any bottom border.
-verbose
Print on Standard Error information about the processing, including exactly how much is being cropped off of which sides.

AUTHOR

Copyright (C) 1989 by Jef Poskanzer.