mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 03:35:28 -04:00
Merge remote-tracking branch 'upstream/release-v1.59'
This commit is contained in:
commit
67a9abc368
180 changed files with 3955 additions and 1330 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue