ensure color mode compatibility when making image thumbnails
This commit is contained in:
parent
300c34e8ce
commit
34d35a2393
@ -41,6 +41,9 @@ def process_media_initial(media_id):
|
||||
with queued_file:
|
||||
thumb = Image.open(queued_file)
|
||||
thumb.thumbnail(THUMB_SIZE, Image.ANTIALIAS)
|
||||
# ensure color mode is compatible with jpg
|
||||
if thumb.mode != "RGB":
|
||||
thumb = thumb.convert("RGB")
|
||||
|
||||
thumb_filepath = mgg.public_store.get_unique_filepath(
|
||||
['media_entries',
|
||||
|
Loading…
x
Reference in New Issue
Block a user