Image sizes
Design and Skin Customization
Yes, the width needs to be cropped to maintain the aspect ratio and maintain the max image dimension (switches from width to height or vice versa but is still an small/xlarge/xxlarge image).
Try out my code above (it replaces the if (strpos($_post['crop'], ':')) section at around line 952, and it does do the job perfectly as far as I can see.