Crop image to maintain aspect ratio