I have an image of size 72x96. Windows says its size is 72x96. PIL Image also says it is 72x96:
from PIL import Image, ImageOps
with Image.open(<path>) as img:
print(img.size) # (72, 96)
print(ImageOps.exif_transpose(img).size) # (72, 96)
But when I read the image with cv2.imread
or skimage.io.imread
it says, that the shape of the image is (96, 72, 3)
:
from skimage.io import imread
im0 = imread(<path>)
print(im0.shape) # (96, 72, 3)
What is wrong here? Even if I do something like that:
import matplotlib.pyplot as plt
plt.imshow(im0)
It shows the image with the correct size, but the written size looks to be transposed.