问题是关于属性问题。我写了代码,但是执行时却说PIL.img中没有ANTIALIAS这样的模块

问题描述 投票:0回答:1

I wrote the code but when executing it, it says that there is no such module as ANTIALIAS in the PIL.img. Can anyone please tell what the problem is how do i solve it and is there any alternative to solve this problem. Also what should be done further to avoid this from the start.

python python-module
1个回答
0
投票

正确的语法是:

from PIL import Image, ImageTk # Capital I, not i

blah = ImageTk.PhotoImage(Image.open("path").resize((940,650), Image.ANTIALIAS))
© www.soinside.com 2019 - 2024. All rights reserved.