Merge remote-tracking branch 'upstream/release-v1.59'

This commit is contained in:
Tulir Asokan 2022-05-10 14:51:50 +03:00
commit 67a9abc368
180 changed files with 3955 additions and 1330 deletions

View file

@ -121,10 +121,10 @@ class Thumbnailer:
#
# If the image has transparency, use RGBA instead.
if self.image.mode in ["1", "L", "P"]:
mode = "RGB"
if self.image.info.get("transparency", None) is not None:
mode = "RGBA"
self.image = self.image.convert(mode)
self.image = self.image.convert("RGBA")
else:
self.image = self.image.convert("RGB")
return self.image.resize((width, height), Image.ANTIALIAS)
def scale(self, width: int, height: int, output_type: str) -> BytesIO: