more fixes

This commit is contained in:
Tanishq Dubey 2025-03-15 19:56:40 -04:00
parent 3898a198bd
commit 2605f7db37

@ -35,10 +35,10 @@ def generate_thumbnail(image_path, resize_percent, min_width, max_width):
elif orientation == 6: elif orientation == 6:
img = img.rotate(90, expand=True) img = img.rotate(90, expand=True)
elif orientation == 8: elif orientation == 8:
img = img.rotate(270, expand=True) img = img.rotate(90, expand=True)
except (AttributeError, KeyError, IndexError): except (AttributeError, KeyError, IndexError):
# cases: image don't have getexif # cases: image don't have getexif
exif = None exif = {}
# Save the thumbnail to a BytesIO object # Save the thumbnail to a BytesIO object
thumbnail_io = BytesIO() thumbnail_io = BytesIO()