mirror of
https://github.com/FAUSheppy/python-flask-picture-factory
synced 2025-12-06 07:01:37 +01:00
allow transparent webp
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user