. Advertisement .
..3..
. Advertisement .
..4..
How can I draw pixel by pixel in python? I will be thankful for your solutions.
from PIL import Image, ImageColor
im = Image.new('1', (2,2)) # create the Image of size 2x2 pixel
im.putpixel((0,0), ImageColor.getcolor('green', '1')) # or whatever color you wish
im.save('simplePixel.jpg') # or any image format
1 Answer