mirror of
https://github.com/sjlongland/tornado-gallery.git
synced 2025-09-13 08:42:23 +10:00
resizer: Do not convert colourspace on GIF images.
This commit is contained in:
parent
f2c917db55
commit
8857696288
@ -216,8 +216,9 @@ class ResizerPool(object):
|
||||
# Resize!
|
||||
img = img.resize((width, height), Image.LANCZOS)
|
||||
|
||||
# Convert to RGB colourspace
|
||||
img = img.convert('RGB')
|
||||
# Convert to RGB colourspace if not GIF
|
||||
if img_format != ImageFormat.GIF:
|
||||
img = img.convert('RGB')
|
||||
|
||||
# Write out the new file.
|
||||
cache_path = self._cache_node.join(cache_dir, cache_name)
|
||||
|
Loading…
Reference in New Issue
Block a user