test fix image rotation
All checks were successful
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 15s
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 23s

This commit is contained in:
Tanishq Dubey 2025-03-15 19:47:44 -04:00
parent fc211edc77
commit d901f00c1f

View File

@ -33,9 +33,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(270, expand=True)
elif orientation == 8:
img = img.rotate(90, expand=True)
elif orientation == 8:
img = img.rotate(270, expand=True)
except (AttributeError, KeyError, IndexError):
# cases: image don't have getexif
exif = None