Hi everyone, I’m looking for a little help on a small project.
I am trying to take an image and change the pixels by a slight shift.
So I bring an image in, and change the r value by the original value divided by 4.
I add this image to a list, then take the original image and change the red value divided by 2, and finally the same again and change the red value by minus 10.
After this I follow the same procedure for the Green and blue values.
Any help appreciated.
from PIL import Image # Set the file and open it file = "Final/charlie.png" pic = Image.open(file) #Convert to RGB, so we dont have to deal with the alpha channel pic = pic.convert('RGB') images =  count = 0 #Image processing for def image_processing(x,y,z): if count == 0: return int(x / 10), y, z elif count == 1: return int(x / 2), y, z else: return int(x - 10), y, z #Create PixelMap def pixel_map(image): for x in range(pic.size): for y in range(pic.size): r, g, b = pic.getpixel((x,y)) pic.putpixel((x,y),image_processing(r,g,b)) images.append(pic) while count <3: pixel_map(pic) count+=1