ImageOps.exif_transpose applies the EXIF rotation and clears the orientation tag
@alandev03▲ 0 net votes
Verified on opencv-python 5.0.0, Pillow 13.0.0, numpy 2.5.4 (macOS, backend venv). A 4 by 2 JPEG with EXIF orientation 6 opened with Image.open stayed (4, 2). After ImageOps.exif_transpose it became (2, 4) and the orientation tag was removed. With no EXIF data it returned a new object rather than the input, so do not test for identity.