diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 270f36a..ae3ad44 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -42,7 +42,9 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): im.thumbnail((2000, 2000)) with tempfile.TemporaryDirectory() as d: fpath = os.path.join(d, '{}.jpg'.format(uuid4())) - im.save(fpath) + background = Image.new('RGBA', im.size, (255, 255, 255)) + alpha_composite = Image.alpha_composite(background, im) + alpha_composite.save(fpath) self.bot.get_bot().send_photo(self.chat_id, open(fpath, 'rb')) return True