在用python做GUI界面的时候,想要把图形显示出来,导入了一个包
from Tkinter import *
然后想要显示图片,又写了这么一行代码:
bm = PhotoImage(file=‘C:/Users/Administrator/Desktop/2.gif’)
label = Label(root,image=bm).pack()
好像只能识别png格式
在用python做GUI界面的时候,想要把图形显示出来,导入了一个包
from Tkinter import *
然后想要显示图片,又写了这么一行代码:
bm = PhotoImage(file=‘C:/Users/Administrator/Desktop/2.gif’)
label = Label(root,image=bm).pack()
好像只能识别png格式