Skip to content

Instantly share code, notes, and snippets.

Created July 23, 2012 16:37
Show Gist options
  • Save anonymous/3164606 to your computer and use it in GitHub Desktop.
Save anonymous/3164606 to your computer and use it in GitHub Desktop.
import Image
img = Image.new('RGB', (512, 8))
pix = img.load()
for x in range(512):
for y in range(8):
if x >= 256:
pix[x, y] = (255, 255, x - 256)
else:
pix[x, y] = (x, x, 0)
img.save('image.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment