python 根据数组生成图片

array = np.asarray(allBigPng, dtype=np.uint8)
image = Image.fromarray(array, 'RGBA')
image.save(outputImgPath + pollutionName + '.png')

注意:dtype一定要写,否则图片生成的不对
原文地址:https://www.cnblogs.com/weihongli/p/7843415.html