标签:bytesio ret val value ext 读取 memory style kivy
借助PIL来处理的图片数据
fp = BytesIO() img = Image.frombytes(‘RGB‘, img_size, buf_bytes, ‘raw‘, ‘BGR;16‘, 0, 1) img.save(fp, ‘png‘) return fp.getvalue()
之后,用kivy.core.image.Image处理数据
self.texture = CoreImage(BytesIO(data), ext = ‘png‘).texture
标签:bytesio ret val value ext 读取 memory style kivy
原文地址:https://www.cnblogs.com/jeroen/p/9236549.html