【发布时间】:2020-03-11 16:20:56
【问题描述】:
我正在构建一个简单的 python 3 程序来打开和调整图像大小。我正在使用 Pycharm。我从 PIL 导入 Image 并尝试运行以下命令:
image1 = Image.open('<file location>')
但解释器显示图像类型没有打开属性的属性错误。
我的程序是:
from PIL import Image
from tkinter import *
root = Tk()
image2 = Image.open('hp png.png')
hp_image2 = Label(root , image = image2)
hp_image2.pack(fill = BOTH)
root.mainloop()
【问题讨论】:
-
将输出包含为文本,而不是图像的链接
-
请将输出添加为文本而不是图像。
标签: python python-3.x tkinter python-imaging-library attributeerror