From 19a03229014fafb423316da2376ca0fcc5272b5b Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 24 Jun 2023 23:59:26 -0700 Subject: [PATCH] Convert all thumbnails to srgb. --- etiquette/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/etiquette/helpers.py b/etiquette/helpers.py index 4acef7b..4b6954d 100644 --- a/etiquette/helpers.py +++ b/etiquette/helpers.py @@ -218,6 +218,7 @@ def _generate_image_thumbnail(filepath, max_width, max_height) -> PIL.Image: if not os.path.isfile(filepath): raise FileNotFoundError(filepath) image = PIL.Image.open(filepath) + image = imagetools.convert_to_srgb(image) (image, exif) = imagetools.rotate_by_exif(image) (image_width, image_height) = image.size (new_width, new_height) = imagetools.fit_into_bounds(