Skip to content

Instantly share code, notes, and snippets.

@stevenroh
Last active February 9, 2018 23:23
Show Gist options
  • Save stevenroh/329687b7a4575d9567449c8cb2d73c09 to your computer and use it in GitHub Desktop.
Save stevenroh/329687b7a4575d9567449c8cb2d73c09 to your computer and use it in GitHub Desktop.
mosaic_extract
from PIL import Image
im = Image.open("mosaic.png")
width, height = im.size
pixels = im.load()
for x in range(50, width, 100):
for y in range(50, height, 100):
pixel = pixels[x, y][2]
print chr(pixel),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment