【发布时间】:2015-06-27 20:42:22
【问题描述】:
我想制作一个带有 gif 动画的 kivy 程序,它运行一次然后停止。 我将 anim_loop 设置为 1 ,但它会一遍又一遍地运行。 代码如下:
Root = Builder.load_string('''
Image:
source: 'streifen1.gif'
size_hint_y: 1
anim_loop: 1
''')
class TTT(App):
def build(self):
Window.clearcolor = (0, 0.5, 1, 1)# sets the backgroundcolor
return Root #returnst the kv string and therefore the root widget`
【问题讨论】:
-
您使用的是 kivy 1.9 吗?您是否可以尝试压缩图片而不是 gif,这可能会得到更好的支持?
-
@inclement 我应该怎么做,文档中没有关于它的内容:kivy.org/docs/…
-
制作一个包含图像的 zip 文件,并将图像源指向该文件名。
-
@inclement,希望它像你描述的那样简单,但我已经尝试过了,但并不快乐。我们已经在无证区域,现在进入巫术。基维,救命!!
标签: python kivy gif animated-gif