2

Kivy after changing Image.texture, gives black result.

My code:

self.ids['profimage'].source = './add_photo.png'

Few lines later...

pimg = Image.open(bio).convert('RGB') # bio is a valid _io.BytesIO object with image data
pimg = pimg.crop((0, 0, int(self.width*0.3), int(self.width*0.3)))
pimg.save(data, format='png')
data.seek(0)
im = CoreImage(BytesIO(data.read()), ext='png')
self.ids['profimage'].texture = im.texture

Before

Before changing texture ^

After

After changing texture ^

Could anybody help me with that?

gboffi
  • 22,939
  • 8
  • 54
  • 85
olokelo
  • 135
  • 1
  • 1
  • 8

0 Answers0