<bdo id='Qzfrj'></bdo><ul id='Qzfrj'></ul>
<legend id='Qzfrj'><style id='Qzfrj'><dir id='Qzfrj'><q id='Qzfrj'></q></dir></style></legend>

    <i id='Qzfrj'><tr id='Qzfrj'><dt id='Qzfrj'><q id='Qzfrj'><span id='Qzfrj'><b id='Qzfrj'><form id='Qzfrj'><ins id='Qzfrj'></ins><ul id='Qzfrj'></ul><sub id='Qzfrj'></sub></form><legend id='Qzfrj'></legend><bdo id='Qzfrj'><pre id='Qzfrj'><center id='Qzfrj'></center></pre></bdo></b><th id='Qzfrj'></th></span></q></dt></tr></i><div id='Qzfrj'><tfoot id='Qzfrj'></tfoot><dl id='Qzfrj'><fieldset id='Qzfrj'></fieldset></dl></div>

    <small id='Qzfrj'></small><noframes id='Qzfrj'>

  • <tfoot id='Qzfrj'></tfoot>

      1. 在 Kivy 应用程序中未播放 Gif 动画

        时间:2023-06-06
          <legend id='66ONX'><style id='66ONX'><dir id='66ONX'><q id='66ONX'></q></dir></style></legend>
        • <tfoot id='66ONX'></tfoot>
            <bdo id='66ONX'></bdo><ul id='66ONX'></ul>

              <small id='66ONX'></small><noframes id='66ONX'>

                <tbody id='66ONX'></tbody>

                <i id='66ONX'><tr id='66ONX'><dt id='66ONX'><q id='66ONX'><span id='66ONX'><b id='66ONX'><form id='66ONX'><ins id='66ONX'></ins><ul id='66ONX'></ul><sub id='66ONX'></sub></form><legend id='66ONX'></legend><bdo id='66ONX'><pre id='66ONX'><center id='66ONX'></center></pre></bdo></b><th id='66ONX'></th></span></q></dt></tr></i><div id='66ONX'><tfoot id='66ONX'></tfoot><dl id='66ONX'><fieldset id='66ONX'></fieldset></dl></div>

                  本文介绍了在 Kivy 应用程序中未播放 Gif 动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I am writing a kivy application, a game, which has an animated gif at the top which should play on a loop, as it does in finder etc. When it loads into the kivy gui it only shows one frame. I am new to kivy and would appreciate some help with this issue. I am using the .kv file to load the image:

                      Image:
                      source: 'spaceshipgif.gif'
                      allow_stretch: True
                  

                  I have studied the documentation on the kivy website and searched around but to no avail.

                  解决方案

                  I don't remember exactly what the gif playing status is - they should work in principle, but some of our providers are better than others at it. As I remember it might work better if you compile kivy with PIL as the image provider. I think some of these problems can be caused by technically incorrect gif files, which aren't handled well by the default provider, but I'm not sure about this.

                  A better solution is to instead put the frames of the .gif as images in a zip file, and set the path to this zip as the image path in your widget. Kivy will automatically animate them for you, including making it easy to change the animation rate (or pause it), without being limited by problems with gif files.

                  这篇关于在 Kivy 应用程序中未播放 Gif 动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何为每个屏幕添加一个自己的 .py 和 .kv 文件? 下一篇:Kivy 和 android 共享首选项

                  相关文章

                  <legend id='pXkWg'><style id='pXkWg'><dir id='pXkWg'><q id='pXkWg'></q></dir></style></legend>

                  <small id='pXkWg'></small><noframes id='pXkWg'>

                      <i id='pXkWg'><tr id='pXkWg'><dt id='pXkWg'><q id='pXkWg'><span id='pXkWg'><b id='pXkWg'><form id='pXkWg'><ins id='pXkWg'></ins><ul id='pXkWg'></ul><sub id='pXkWg'></sub></form><legend id='pXkWg'></legend><bdo id='pXkWg'><pre id='pXkWg'><center id='pXkWg'></center></pre></bdo></b><th id='pXkWg'></th></span></q></dt></tr></i><div id='pXkWg'><tfoot id='pXkWg'></tfoot><dl id='pXkWg'><fieldset id='pXkWg'></fieldset></dl></div>

                      • <bdo id='pXkWg'></bdo><ul id='pXkWg'></ul>
                    1. <tfoot id='pXkWg'></tfoot>