Switch width/height if the image is rotated.