title: Convert a raw RGB array into a png image.
body: <p>I am trying to read a image file using PIL and then obtaining the raw pixel values in form of numpy array and then i am trying to put together the values to form a copy of original image. The code does not produce any runtime error but the image formed ("my.png") is unreadable.</p>
  
  <pre><code>from PIL import Image
  
  import numpy as np
  
  img_filename = "image.png"
  img = Image.open(img_filename)
  img = img.convert("RGB")
  img.show()
  aa  = np.array(img.getdata())
  alpha = Image.fromarray(aa,"RGB")
  alpha.save('my.png')
  alpha.show()
  </code></pre>