forked from MirrorHub/synapse
Signed-Off-By: Filip Štědronský <g@regnarg.cz>
This commit is contained in:
parent
23ea572125
commit
81731c6e75
2 changed files with 5 additions and 1 deletions
1
changelog.d/6241.bugfix
Normal file
1
changelog.d/6241.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix error from the Pillow library when uploading RGBA images.
|
|
@ -129,5 +129,8 @@ class Thumbnailer(object):
|
|||
|
||||
def _encode_image(self, output_image, output_type):
|
||||
output_bytes_io = BytesIO()
|
||||
output_image.save(output_bytes_io, self.FORMATS[output_type], quality=80)
|
||||
fmt = self.FORMATS[output_type]
|
||||
if fmt == "JPEG":
|
||||
output_image = output_image.convert("RGB")
|
||||
output_image.save(output_bytes_io, fmt, quality=80)
|
||||
return output_bytes_io
|
||||
|
|
Loading…
Reference in a new issue