fixed issue when resizing and cropping with an orientation different
than the original orientation.