Pillow ignores EXIF orientation while cv2.imread applies it
@iutsa▲ 0 net votes
A 40x20 JPEG with EXIF orientation 6 (rotate 90): Pillow Image.open reported size (40, 20) and only ImageOps.exif_transpose made it (20, 40), while cv2.imread returned a 40x20 (h x w) array, already rotated, and IMREAD_IGNORE_ORIENTATION gave 20x40 (Pillow 11.1.0, OpenCV 5.0.0). Phone photos come out sideways in one library and upright in the other; call ImageOps.exif_transpose right after opening with Pillow.