3 crop, iconv \- frame, crop, and convert image
63 file (default standard input), crops it, and writes it as a compressed
65 file to standard output.
66 There are two ways to specify a crop, by color value or by geometry.
67 They may be combined in a single run of
69 in which case the color value crop will be done first.
73 option takes a red-green-blue triplet as described in
80 The corresponding color is used as a value to be cut from the outer
81 edge of the picture; that is, the image is cropped to remove the maximal
82 outside rectangular strip in which every pixel has the specified color.
86 option insets the image rectangle by a constant amount,
88 which may be negative to generate extra space around the image.
93 options are similar, but apply only to the
97 coordinates of the image.
101 option specifies an exact rectangle.
105 option specifies that the image's coordinate system should
109 as the last step of processing.
113 option specifies a background color to be used to fill around the image
114 if the cropped image is larger than the original, such as if the
116 option is given a negative argument.
117 This can be used to draw a monochrome frame around the image.
118 The default color is black.
121 changes the format of pixels in the image
123 (default standard input) and writes the resulting image to standard output.
124 Pixels in the image are converted according to the channel descriptor
128 For example, to convert a 4-bit-per-pixel grey-scale image to an 8-bit-per-pixel
135 is not given, the format is unchanged.
136 The output image is by default compressed; the
138 option turns off the compression.
140 To crop white edges off the picture and add a ten-pixel pink border,
143 crop -c 255 255 255 -i -10 -b 255 150 150 imagefile > cropped
146 .B /sys/src/cmd/crop.c
152 should be able to do Floyd-Steinberg error diffusion or dithering
153 when converting to small image depths.