Rotate thumbnail by exif to ensure correct appearance.

master
voussoir 2021-05-30 19:13:46 -07:00
parent e8cb183849
commit 1ee73feb6c
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 1 additions and 0 deletions

View File

@ -208,6 +208,7 @@ def generate_image_thumbnail(filepath, width, height):
if not os.path.isfile(filepath): if not os.path.isfile(filepath):
raise FileNotFoundError(filepath) raise FileNotFoundError(filepath)
image = PIL.Image.open(filepath) image = PIL.Image.open(filepath)
image = imagetools.rotate_by_exif(image)
(image_width, image_height) = image.size (image_width, image_height) = image.size
(new_width, new_height) = imagetools.fit_into_bounds( (new_width, new_height) = imagetools.fit_into_bounds(
image_width=image_width, image_width=image_width,