I'm very new at this, so apologies for any term misuse.
I am coding in Python. I have a 2D list that contains the grayscale values for every pixel in an image. I have modified these values as needed and would now like to save them into a new image. How can I construct this new jpeg from my array of grayscale values?
I would like them saved in a manner that does not overwrite my original image files, if possible.
I am using PIL; I opened the original file with Image.open('filename')
and extracted the grayscale values at each pixel location with im.getpixel((i,j))
inside two for loops.