Python 3.x 基维:长图像不显示

Python 3.x 基维:长图像不显示,python-3.x,numpy,opencv,kivy,Python 3.x,Numpy,Opencv,Kivy,我有一个非常基本的测试程序。 以下是Python代码: class TestImage(BoxLayout): pass class TestApp(App): def build(self): return TestImage() if __name__ == "__main__": TestApp().run() 这是kv代码 <TestImage>: orientation: 'vertical'

我有一个非常基本的测试程序。 以下是Python代码:

class TestImage(BoxLayout):
    pass

class TestApp(App):
    def build(self):
        return TestImage()

if __name__ == "__main__":
    TestApp().run()
这是kv代码

<TestImage>:
    orientation: 'vertical'
    Image:
        id: bg_img
        keep_ratio: True
        allow_stretch: True
        size_hint_y: None
        height: Window.height
        source: 'template.jpg'
Kivy只显示一个黑屏。如何显示此图像? 我尝试过的事情:

  • 将图像转换为其他格式(png/tiff)仍然不起作用
  • 操纵kv文件内的大小

  • 显然,我超出了控制台日志中指出的能够呈现的最大大小:

    [INFO] [GL ] Texture max size 8192.
    
    我的情况是8192。除此之外,kivy还显示了一个黑屏。 解决方案是将图像切碎/调整大小,使其在限制范围内达到合理大小

    [INFO] [GL ] Texture max size 8192.