fix orientation of images
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 56s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 57s
Release / build (push) Successful in 1m46s
Release / publish_head (push) Successful in 1m18s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 3m42s

This commit is contained in:
2025-07-06 22:27:33 -04:00
parent 195c353710
commit 17145628a0

View File

@ -34,9 +34,9 @@ def generate_thumbnail(image_path, resize_percent, min_width, max_width):
if orientation == 3:
img = img.rotate(180, expand=True)
elif orientation == 6:
img = img.rotate(90, expand=True)
elif orientation == 8:
img = img.rotate(270, expand=True)
elif orientation == 8:
img = img.rotate(90, expand=True)
except (AttributeError, KeyError, IndexError):
# cases: image don't have getexif
exif = b""