title: Python PIL library - Saving an image from a RGBA array
body: <p>I am currently using the PIL library to manipulate the pixel colours in an image.</p>
  
  <p>My problem is that I don't know how to save a rgba array into a png file.</p>
  
  <pre><code>image = Image.open(filepath)
  pixels = image.load()
  </code></pre>
  
  <p>...after changing the rgba values in pixels e.g. </p>
  
  <pre><code>pixels[2,10] = 30, 40, 50, 60
  </code></pre>
  
  <p>Then if I try to save pixels like this:</p>
  
  <pre><code>pixels.save(path)
  </code></pre>
  
  <p>i get error</p>
  
  <pre><code>AttributeError: 'PixelAccess' object has no attribute 'save'
  </code></pre>
  
  <p>How do I then save pixels back into an png file?</p>
  
  <p>(sorry in advance if this is a stupid question)</p>
  
  <p>Thanks!
  Andrew</p>