I am trying to import an image, then manipulate its rgb colors. This is what i've got:
from PIL import Image
image = Image.open('grapes.jpg')
pixels = list(image.getdata())
for pixel in pixels:
pixel = (pixel[0] - 50, pixel[1] , pixel[2])
image.putdata(pixel)
image.save('grapes_modified.jpg')
as you can see, i am trying to reduce the red channel. This doesn't work. It produces the exact duplicate of the imported image.
even if i where to do something like this: pixel = (0,0,0). It would produce a duplicate image.
so how do i modify the image?
thanks,