1from PIL import Image
2
3im = Image.open('dead_parrot.jpg') # Can be many different formats.
4pix = im.load()
5print im.size # Get the width and hight of the image for iterating over
6print pix[x,y] # Get the RGBA Value of the a pixel of an image
7pix[x,y] = value # Set the RGBA Value of the image (tuple)
8im.save('alive_parrot.png') # Save the modified pixels as .png
9