mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-21 01:21:59 +03:00
Use lanczos for compression and always compress
This commit is contained in:
parent
9cf4cd70d1
commit
4e305c9e17
|
@ -58,10 +58,7 @@ def _resize_photo_if_needed(
|
|||
except KeyError:
|
||||
kwargs = {}
|
||||
|
||||
if image.width <= width and image.height <= height:
|
||||
return file
|
||||
|
||||
image.thumbnail((width, height), PIL.Image.ANTIALIAS)
|
||||
image.thumbnail((width, height), PIL.Image.LANCZOS)
|
||||
|
||||
alpha_index = image.mode.find('A')
|
||||
if alpha_index == -1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user