PIL Image 将numpy的数组转化为PIL Image类型

a=np.zeros((256,256,3))
b = Image.fromarray(a, mode='RGB')
b.show()

img = np.array(Image.open("lena.jpg"))
img = Image.fromarray(img, mode='RGB')
img.show()