Crop bounds bug fix

Fixed a bug that would infinite loop the program if the crop rectangle's
bounds exceeded those of the image.