比如说,吾从C中调用Python,传递了一个char数组,是RGB格式的。如何转换为Image?
如下即可:
image = Image.frombuffer('RGB', (width, height), chars)
比如说,吾从C中调用Python,传递了一个char数组,是RGB格式的。如何转换为Image?
如下即可:
image = Image.frombuffer('RGB', (width, height), chars)
微信扫码登录