Skip to content

Instantly share code, notes, and snippets.

@indam
Created January 30, 2015 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indam/f969c46882501518742c to your computer and use it in GitHub Desktop.
Save indam/f969c46882501518742c to your computer and use it in GitHub Desktop.
create image
from PIL import Image
size = width, height = (40, 20)
image = Image.new("RGB", size, None)
pixels = image.load()
for y in range(height):
for x in range(width):
pixels[x, y] = (x, y, 0)
image.save('fill.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment