Cropping an image 

*Tags*: image convert crop cut

The 'convert' command has a '-crop' command.

-crop widthxheight{+-}x{+-}y{%}

The width and height give the size of the image that remains after cropping, and x and y are offsets that give the location of the top left corner of the cropped image with respect to the original image.

If this canvas and position image information is not wanted, then you can use the special "+repage" operator to reset the page canvas and position to match the actual cropped image.

If you want to crop say the right hand side of a image out, use the the -gravity option.

Note that while the size can be a percentage the offset will always be in pixels. You can not provide an offset as a percentage of the image size.

To specify the amount to be removed, use -shave instead. To remove pixels from the interior of an image, use -chop.