python 数组转成图片(含避坑点,无输出不出来错误、直接运行即可)

只需要:

1 im = Image.fromarray(np.uint8(“你的数组”))
2     im.convert('RGB').save("MY.jpg",format = 'jpeg')
原文地址:https://www.cnblogs.com/smartisn/p/12493301.html