From 278d25c803208af0c5a0176a758aa98ac5e21b8e Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 5 Apr 2018 09:28:31 +0200 Subject: [PATCH] Thumbnails: Fix PNG alpha --- src/pretix/helpers/thumb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/helpers/thumb.py b/src/pretix/helpers/thumb.py index 40e7042f03..8c66ed4b07 100644 --- a/src/pretix/helpers/thumb.py +++ b/src/pretix/helpers/thumb.py @@ -58,7 +58,7 @@ def create_thumbnail(sourcename, size): checksum = hashlib.md5(image.tobytes()).hexdigest() name = checksum + '.' + size.replace('^', 'c') + '.png' buffer = BytesIO() - if image.mode not in ("1", "L", "RGB"): + if image.mode not in ("1", "L", "RGB", "RGBA"): image = image.convert('RGB') image.save(fp=buffer, format='PNG') imgfile = ContentFile(buffer.getvalue())