The code didnt take the original image in consideration when resizing
with a cropped fit which could lead into negative crops if the ratio of
the crop was bigger than the ratio of the original image.