crop, iconv – frame, crop, and convert image
file (default standard input), crops it, and writes it as a compressed
file to standard output.
There are two ways to specify a crop, by color value or by geometry.
They may be combined in a single run of
in which case the color value crop will be done first.
option takes a red-green-blue triplet as described in
(For example, white
The corresponding color is used as a value to be cut from the outer
edge of the picture; that is, the image is cropped to remove the maximal
outside rectangular strip in which every pixel has the specified color.
option insets the image rectangle by a constant amount,
which may be negative to generate extra space around the image.
options are similar, but apply only to the
coordinates of the image.
option specifies an exact rectangle.
option specifies that the image’s coordinate system should
be translated by
as the last step of processing.
option specifies a background color to be used to fill around the image
if the cropped image is larger than the original, such as if the
option is given a negative argument.
This can be used to draw a monochrome frame around the image.
The default color is black.
changes the format of pixels in the image
(default standard input) and writes the resulting image to standard output.
Pixels in the image are converted according to the channel descriptor
For example, to convert a 4-bit-per-pixel grey-scale image to an 8-bit-per-pixel
is not given, the format is unchanged.
The output image is by default compressed; the
option turns off the compression.
To crop white edges off the picture and add a ten-pixel pink border,
crop -c 255 255 255 -i -10 -b 255 150 150 imagefile > cropped
should be able to do Floyd-Steinberg error diffusion or dithering
when converting to small image depths.