You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

#!/usr/bin/python
from PIL import Image
WIDTH = 7
HEIGHT = 7
for i in range(1<<15):
img = Image.new("RGB", (WIDTH, HEIGHT), (255, 255, 255))
pix = img.load()
if (i & (1 << 0)):
pix[1, 1] = (0, 0, 0)
pix[5, 1] = (0, 0, 0)
if (i & (1 << 1)):
pix[2, 1] = (0, 0, 0)
pix[4, 1] = (0, 0, 0)
if (i & (1 << 2)):
pix[3, 1] = (0, 0, 0)
if (i & (1 << 3)):
pix[1, 2] = (0, 0, 0)
pix[5, 2] = (0, 0, 0)
if (i & (1 << 4)):
pix[2, 2] = (0, 0, 0)
pix[4, 2] = (0, 0, 0)
if (i & (1 << 5)):
pix[3, 2] = (0, 0, 0)
if (i & (1 << 6)):
pix[1, 3] = (0, 0, 0)
pix[5, 3] = (0, 0, 0)
if (i & (1 << 7)):
pix[2, 3] = (0, 0, 0)
pix[4, 3] = (0, 0, 0)
if (i & (1 << 8)):
pix[3, 3] = (0, 0, 0)
if (i & (1 << 9)):
pix[1, 4] = (0, 0, 0)
pix[5, 4] = (0, 0, 0)
if (i & (1 << 10)):
pix[2, 4] = (0, 0, 0)
pix[4, 4] = (0, 0, 0)
if (i & (1 << 11)):
pix[3, 4] = (0, 0, 0)
if (i & (1 << 12)):
pix[1, 5] = (0, 0, 0)
pix[5, 5] = (0, 0, 0)
if (i & (1 << 13)):
pix[2, 5] = (0, 0, 0)
pix[4, 5] = (0, 0, 0)
if (i & (1 << 14)):
pix[3, 5] = (0, 0, 0)
img.save("img/{0}.png".format(i))