Skip to content

Commit

Permalink
Fixed orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
ActiveChooN committed Apr 4, 2022
1 parent 6af6b0b commit 99f9662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cvat/apps/engine/media_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def rotate_within_exif(img: Image):
orientation = img.getexif().get(ORIENTATION_EXIF_TAG, ORIENTATION.NORMAL_HORIZONTAL)
if orientation in [ORIENTATION.NORAMAL_180_ROTATED, ORIENTATION.MIRROR_VERTICAL]:
img = img.rotate(180, expand=True)
elif orientation in [ORIENTATION.MIRROR_HORIZONTAL_270_ROTATED, ORIENTATION.NORAMAL_270_ROTATED]:
elif orientation in [ORIENTATION.NORAMAL_270_ROTATED, ORIENTATION.MIRROR_HORIZONTAL_90_ROTATED]:
img = img.rotate(90, expand=True)
elif orientation in [ORIENTATION.NORAMAL_90_ROTATED, ORIENTATION.MIRROR_HORIZONTAL_90_ROTATED]:
elif orientation in [ORIENTATION.NORAMAL_90_ROTATED, ORIENTATION.MIRROR_HORIZONTAL_270_ROTATED]:
img = img.rotate(270, expand=True)
if orientation in [
ORIENTATION.MIRROR_HORIZONTAL, ORIENTATION.MIRROR_VERTICAL,
Expand Down

0 comments on commit 99f9662

Please sign in to comment.