Python Kivy - Image appears as black screen area

Viewed 843

I want to create an app using Python & Kivy that contains the possibility to display all images in a directory (that was selected by the user). For that, I use a for loop:

from kivy.uix.image import Image as KivyImage

for img_path in img_list:
    i=KivyImage(source=img_path)
    self.root.ids.image_grid.add_widget(i)

image_grid is defined in the kv file:

GridLayout:
    id:image_grid
    cols:4

My problem is that all the images only appear as black areas on the screen (that have the size of the images). I'm not sure what I'm doing wrong here. For example, if I replace the image with a button that has the image as its background, it works and the image is visible. Do you have any suggestions on how to fix this?

0 Answers
Related