Added capability to use EXIF rotation metadata, using the imagemagick -auto-orient option.
As part of this, streamlined create_constrained_square_crop() to use the IM -extent option rather than in-house code (see http://www.imagemagick.org/script/command-line-options.php?#extent)
Changed Imagemagick calls so that by default, image width & height data are not needed.
Removed excessive calls to getimagesize, with associated passing of width & height. Placed call within the only function in which it is needed - if it fails, use default.
Reduced code duplication in call to convert function.
Aesthetic change only: tidy up indentation
Simpler (and hopefully faster) image cropping routine. Behaviour should be identical, but image is first cropped, then resized.
Merge pull request #34 from hyanwong/EXIFrotation

Added capability to use EXIF rotation metadata, using the imagemagick -a...