根据网上的思路,将一个gif分成十帧存入数组,再遍历数组为啥他动不起来
frames=[PhotoImage(file="images/rabbit.gif", format='gif -index %i' %(i)) for i in range(10)]
for i in range(10):
frame= frames[i]
botlab = Label(self.master, image=frame)
botlab.image= frame
botlab.configure(image=frame)
botlab.place(x=10, y=10)
用Canvas控件,不要用Label
参考:
https://zhuanlan.zhihu.com/p/140479802