Update src/rendering/image.py
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 52s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 1m0s
Release / build (push) Successful in 1m22s
Release / publish_head (push) Successful in 1m17s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 3m44s

This commit is contained in:
2025-07-06 21:54:59 -04:00
parent 9c06401557
commit 5a56496538

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