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