我从网上用 aiohttp 抓取了一些图片,并将它们保存在一个列表中,其中包含这样的数组('\xe25\xd7\xeeP{\x08\x18-6\x809\xabQ1LQ\xf0\x02hC\x11\x97* .\xc8...')
我正在尝试使用画布和 Photoimage 显示图片,但它不起作用
这是我的代码的一些片段,在此先感谢,对不起我的英语
bytesfoto=self.fotobytes[indice]
img = ImageTk.PhotoImage(Image.open(BytesIO(bytesfoto)))
self.canvas.create_image(20, 20, anchor=NW, image=img)
self.canvas = Canvas(width=300, height=300)
self.canvas.grid(row=2, column=1)