更改Image.texture后,变黑,结果为黑色。
我的代码:
self.ids['profimage'].source = './add_photo.png'
稍后几行...
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
更改纹理之前
更改纹理后^
有人可以帮我吗?