Image Cropping Selection

The crop utility has the option of setting minimum dimensions and/or a crop ratio. A preview of the resulting image is shown below. In this example minWidth, minHeight, and ratio are set. This utility gives the user the option of what areas get cropped off when the image to be saved requires a specified ratio (Excellent for thumbnail image selection).

This sample uses the Scriptaculous and Prototype libraries. The example is an alteration/combination of several code postings by David Spurr http://www.defusion.org.uk.