1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-09-13 08:42:23 +10:00

resizer: Convert to RGB colourspace when saving.

This commit is contained in:
Stuart Longland 2018-04-18 14:06:51 +10:00
parent 1b675c7ff4
commit f43b020d94
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -200,6 +200,9 @@ class ResizerPool(object):
# Resize!
img = img.resize((width, height), Image.LANCZOS)
# Convert to RGB colourspace
img = img.convert('RGB')
# Write out the new file.
img.save(open(cache_path,'wb'), img_format.pil_fmt)