fix png
This commit is contained in:
parent
4df9c68d78
commit
726ce8ac0e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user