Fun things to do with computers and photographs
Random header image... Refresh for more!

Cropping

[5,10,80,95]
Specify the crop rectangle of the image in percent. In order, the values specify the location of the following edges: left, top, right, bottom. Note that the actual image crop may be smaller, if the aspect ratio is also set (see below). By default, the crop region is assumed to be the whole image i.e. [0,0,100,100].
[6:4]
Specify the aspect ratio of the image. The two values specify horizontal to vertical aspect ratio. The image is cropped so that it has this aspect ratio, and fits exactly within the crop rectangle specified above (or the whole image if no crop region is specified).
[500x500,50,50]
[1500x2250,+170,-100]
Specify an absolute crop rectangle. If this option is given, the other two options above are ignored. The first two parameters are the size of the crop region in pixels. The next two parameters specify the location of the rectangle as follows:
  • A number specifies the location of the centre of the rectangle, as a percentage of the image size in that axis. This is most useful for generating 1-1 crops at, for example, the image centre (as given above) or the “rule of thirds” corners. For example, [500×500,50,50] generates the 500×500-pixel crop at the centre of the image.
  • A number prefixed by + or specifies the distance, in pixels, of the relevant edge of the crop rectangle from the edge of the image, where + indicates the top or left edge, and indicates the right or bottom edge. This is most useful when you know precisely what area of the image you wish to crop. For example, [500×500,+0,+0] generates the 500×500-pixel crop at the top left of the image, [500×500,+0,–0] generates the 500×500-pixel crop at the top right of the image, and so on. These offset parameters can be mixed—for example, [500×500,+0,50] generates the 500×500-pixel crop on the left edge of the image.
[-]
This special value is used to clear all crop options.

The image cropping parameters can be provided as arguments to the following commands: generate, options and variant.