fix sticker antialias algo

This commit is contained in:
bakatrouble 2024-07-04 22:06:03 +03:00
parent 3b03c65646
commit 07d927ef4d

View File

@ -37,7 +37,7 @@ class StickersBotModuleConfig(TelegramBotModuleConfig):
target_width = 512
else:
target_height = 512
im = im.resize((target_width, target_height), Image.ANTIALIAS)
im = im.resize((target_width, target_height), Image.LANCZOS)
with tempfile.NamedTemporaryFile(suffix='.png') as f:
im.quantize(method=2).save(f, 'png')
f.seek(0)