Woops wrong img deseralization

pull/4/head
Guillermo Rodriguez 2023-01-16 00:04:20 -03:00
parent 97f7d51782
commit 6453240f3a
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ async def run_skynet_telegram(
if meta['upscaler'] == 'x4': if meta['upscaler'] == 'x4':
size = (size[0] * 4, size[1] * 4) size = (size[0] * 4, size[1] * 4)
img = Image.frombytes('RGB', size, img_raw) img = Image.open(io.BytesIO(img_raw))
await bot.send_photo( await bot.send_photo(
message.chat.id, message.chat.id,
@ -203,7 +203,7 @@ async def run_skynet_telegram(
if meta['upscaler'] == 'x4': if meta['upscaler'] == 'x4':
size = (size[0] * 4, size[1] * 4) size = (size[0] * 4, size[1] * 4)
img = Image.frombytes('RGB', size, img_raw) img = Image.open(io.BytesIO(img_raw))
await bot.send_photo( await bot.send_photo(
message.chat.id, message.chat.id,