allow transparent webp

This commit is contained in:
Yannik Schmidt
2021-07-07 16:43:22 +02:00
parent 6e8742f906
commit 3fe17b4743

View File

@@ -52,7 +52,7 @@ def generatePicture(pathToOrig, scaleX, scaleY, encoding, crop):
return (newPath, True) return (newPath, True)
# save image with new size and encoding # # save image with new size and encoding #
if image.mode in ("RGBA", "P") and encoding in ("jpeg", "webp"): if image.mode in ("RGBA", "P") and encoding in ("jpeg"):
image = image.convert("RGB") image = image.convert("RGB")
if crop: if crop: