Never upscale images when thumbnailing

This commit is contained in:
miruka 2019-10-30 05:34:32 -04:00
parent 412a86762e
commit 48bcc91582

View File

@ -402,7 +402,8 @@ class MatrixClient(nio.AsyncClient):
if small and is_jpg_png and not opaque_png:
raise UneededThumbnail()
thumb.thumbnail((512, 512))
if not small:
thumb.thumbnail((512, 512))
with io.BytesIO() as out:
if thumb.mode == "RGBA":