From 92c401f17cf282150def0baf5bcf7dfa0c805a04 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 24 Sep 2021 00:54:59 +0200 Subject: [PATCH] Fix #133. Image photo: enleve canal alpha avant conversion en jpeg. --- app/scodoc/sco_photos.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/scodoc/sco_photos.py b/app/scodoc/sco_photos.py index 1e24c6dff9..705535902c 100644 --- a/app/scodoc/sco_photos.py +++ b/app/scodoc/sco_photos.py @@ -303,6 +303,7 @@ def save_image(etudid, data): filename = get_new_filename(etudid) path = os.path.join(PHOTO_DIR, filename) log("saving %dx%d jpeg to %s" % (img.size[0], img.size[1], path)) + img = img.convert("RGB") img.save(path + IMAGE_EXT, format="JPEG", quality=92) # resize: img = scale_height(img)