Fix #133. Image photo: enleve canal alpha avant conversion en jpeg.

This commit is contained in:
Emmanuel Viennet 2021-09-24 00:54:59 +02:00
parent 36c7358eed
commit 92c401f17c

View File

@ -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)