From 23ce3be362b5aab01c4b910ee5e3e40913d013fd Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Sat, 15 Mar 2025 20:01:07 -0400 Subject: [PATCH] more fixes --- src/rendering/image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/image.py b/src/rendering/image.py index 306bc1d..52e059b 100644 --- a/src/rendering/image.py +++ b/src/rendering/image.py @@ -30,12 +30,13 @@ def generate_thumbnail(image_path, resize_percent, min_width, max_width): try: exif = img.info['exif'] orientation = img._getexif().get(0x0112, 1) # 0x0112 is the EXIF orientation tag + print(f"EXIF orientation: {orientation}, {image_path}") if orientation == 3: img = img.rotate(180, expand=True) elif orientation == 6: img = img.rotate(270, expand=True) elif orientation == 8: - img = img.rotate(270 expand=True) + img = img.rotate(270, expand=True) except (AttributeError, KeyError, IndexError): # cases: image don't have getexif exif = {}