From e39bbcf767175221fc542ecd84bdb1541ef8d26e Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Tue, 12 Nov 2019 20:48:34 +0300 Subject: [PATCH] fix png --- bots/modules/channel_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 085ae2c..47ed717 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -44,7 +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 = alpha_composite.convert('RGB') alpha_composite.save(fpath) self.bot.get_bot().send_photo(self.chat_id, open(fpath, 'rb')) return True