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

        <bdo id='bNgFQ'></bdo><ul id='bNgFQ'></ul>

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

      1. <legend id='bNgFQ'><style id='bNgFQ'><dir id='bNgFQ'><q id='bNgFQ'></q></dir></style></legend>
      2. 在 Kivy 中从内存中加载图像

        时间:2023-10-09
            • <bdo id='AZFnY'></bdo><ul id='AZFnY'></ul>

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

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

                  <tbody id='AZFnY'></tbody>

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

                1. 本文介绍了在 Kivy 中从内存中加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在内存中有一张图片格式(从pyplot输出),我想通过Kivy直接在Android上显示它,但我不想创建图片文件.有没有办法做到这一点?在 pyplot 上,我可以通过将对象写入对象来生成类似对象的文件,但我不知道如何将其放入 Kivy.

                  I have a picture in memory a format (output from pyplot) and I want to directly show it on the Android through Kivy, but I don't want to create a picture file. Is there any way to do this? On pyplot I am able to generate the file like object by writing it the object, but I don't know how to put it into Kivy.

                  推荐答案

                  您可以使用 StringIO 将文件保存到缓冲区中(参见:Python中的二进制缓冲区).

                  You could save the file into a buffer with StringIO (see this: Binary buffer in Python).

                  类似:

                  from StringIO import StringIO
                  buff = StringIO()
                  plt.savefig(buff)
                  buff.seek(0)
                  from kivy.core.image.img_pygame import ImageLoaderPygame
                  imgdata = ImageLoaderPygame(buff)._data
                  

                  这篇关于在 Kivy 中从内存中加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将 OpenCV 网络摄像头集成到 Kivy 用户界面中 下一篇:如何隐藏主窗口标题栏并在 kivy 框架中放置透明

                  相关文章

                  最新文章

                2. <tfoot id='AKt26'></tfoot>

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

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