我想使用 python3.6 将 png 图像更改为 gif 图像,我该怎么做?我正在用 tkinter 制作一个 GUI 程序,我必须将 png 更改为 gif 图像,这样我就可以在我的程序上显示请帮助
tk = Tk()
tk.configure(bg = 'white')
tk.title("SearchKeyWord V2.0")
canvas = Canvas(tk,width = 880, height = 550,bd = 0,highlightthickness = 0)
canvas.pack()
txt = Entry(tk)
txt.place(relx = .9,rely = .3,anchor = "c")
LOGO = PhotoImage(file = 'SKW-LOGO.gif')
button_1 = PhotoImage(file = 'button.gif')
button_2 = PhotoImage(file = 'button_news_1d.gif')
button_3 = PhotoImage(file = 'button_news_1w.gif')
button = tkinter.Button(tk,image = button_1,command = search)
button_news_1d = tkinter.Button(tk,image = button_2)
button_news_1w = tkinter.Button(tk,image = button_3)
canvas.create_image(0,0,anchor = NW, image = LOGO)
button.place(relx=.8, rely=.5, anchor="c")
button_news_1d.place(relx =.8,rely = .7, anchor = "c" )
button_news_1w.place(relx =.8,rely = .9, anchor = "c" )
tk.update()
tk.mainloop()