I am trying to learn about image processing in Rasbian on the Pi3. For my first little project I decided to read a JPG file from disk, and then paint it to the screen, one pixel at a time. I cannot find much help on this, probably because there are not too many good reasons to do this. But, this is what I want to do. Here is the bit of code I tried. The fill in draw.point should be the color for the original file - that is problem 1 - how to get that value. The second problem is newimage.show() does not show anything.
I am just looking for a little direction here - not necessarily a total solution. I not even sure if PIL is the best option. Thanks for any help.
from PIL import Image,ImageDraw im = Image.open("test.jpg") print(im.format, im.size, im.mode) im.show() #does nothing xsize, ysize = im.size print(xsize) print(ysize) # set up an output image newim = Image.new("RGB", (xsize,ysize)) draw = ImageDraw.Draw(newim) for pixelx in range (0,xsize): for pixely in range (0,ysize): #ImageDraw.draw.point((pixelx,pixely), fill=None) draw.point((pixelx,pixely),fill=255) #fill should be actual color newim.show() #does nothing