This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.

# ImageCrop

 ImageCrop[image] crops image by removing borders of uniform color. ImageCrop[image, {w, h)]crops image to pixel width w and pixel height h. ImageCrop[image, size]crops image based on the size specification size. ImageCrop[image, size, spec]crops image by removing pixels from sides specified by spec.
• ImageCrop[image] effectively starts at the borders of image, then removes as many layers of pixels as possible where all their color values exactly match the colors of the borders.
• ImageCrop[image, {w, h}] by default removes pixels symmetrically from image, or if w or h is larger than for image, it adds pixels symmetrically.
• The final image size specification size in ImageCrop[image, size] can have following forms:
 {w,h} particular width and height w width w; height based on aspect ratio {s} maximum width or height s {{wmax},{hmax}} width and height maximums {{wmin,wmax},{hmin,hmax}} width and height ranges
• The following special forms can be used for width or height:
 Full do no cropping in this dimension Automatic determine value from aspect ratio
• The cropping specification spec in ImageCrop[image, size, spec] can have the following forms:
 side crop on the specified side; center otherwise {side1,side2} crop on the specified sides {ax,ay} assign a fraction of cropping to each side
• Cropping fractions are between -1 and +1. In the horizontal case, -1 is equivalent to Left, +1 to Right, and 0 to Center. In the vertical case, -1 is equivalent to Bottom, and +1 to Top.
• The following options can be given:
 AspectRatio Automatic ratio of height to width for the final image Padding Black padding to use if necessary
 Automatic use the aspect ratio of the original image r use aspect ratio r
• If the final image specified by ImageCrop[image, ...] extends beyond image, then pixels are added according to the setting for Padding.
Automatically crop uniform borders:
Crop an image to a 100 by 100 pixels:
Crop to a width of 100 pixels and a height of 50 pixels:
Crop at the left side:
Crop at the left and the bottom side:
Padding is used if a size larger than the original size is specified:
Automatically crop uniform borders:
 Out[1]=

Crop an image to a 100 by 100 pixels:
 Out[1]=

Crop to a width of 100 pixels and a height of 50 pixels:
 Out[1]=

Crop at the left side:
 Out[1]=

Crop at the left and the bottom side:
 Out[1]=

Padding is used if a size larger than the original size is specified:
 Out[1]=
 Applications   (1)
Pad an image to a fixed size:
New in 7