报错_tkinter.TclError: couldn‘t recognize data in image file “D:\images\1 (10).jpg“
python报错_tkinter.TclError: couldn’t recognize data in image file “D:\images\1 (10).jpg”
练习用label部件显示图片和文本的代码:
import tkinter as tk
filename = 'D:\\images\\1 (10).jpg'
root = tk.Tk()
photo = tk.PhotoImage(file=filename)
label1 = tk.Label(root,text='学习pyth
原创
2020-07-16 15:32:27 ·
5098 阅读 ·
0 评论