From 726ce8ac0e6d112f9e9b3fac080c406f6a4e7622 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Tue, 12 Nov 2019 20:46:34 +0300 Subject: [PATCH] fix png --- bots/modules/channel_helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index ae3ad44..085ae2c 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -44,6 +44,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): fpath = os.path.join(d, '{}.jpg'.format(uuid4())) background = Image.new('RGBA', im.size, (255, 255, 255)) alpha_composite = Image.alpha_composite(background, im) + alpha_composite.convert('RGB') alpha_composite.save(fpath) self.bot.get_bot().send_photo(self.chat_id, open(fpath, 'rb')) return True