support cropping on images rotated in increments of 90 degrees