Convert all thumbnails to srgb.
This commit is contained in:
parent
22702342bc
commit
19a0322901
1 changed files with 1 additions and 0 deletions
|
@ -218,6 +218,7 @@ def _generate_image_thumbnail(filepath, max_width, max_height) -> PIL.Image:
|
||||||
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.convert_to_srgb(image)
|
||||||
(image, exif) = imagetools.rotate_by_exif(image)
|
(image, exif) = 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(
|
||||||
|
|
Loading…
Reference in a new issue