Skip to content

Instantly share code, notes, and snippets.

@samclane
Created November 13, 2018 21:27
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 samclane/7495aaad7edcc8fac29e8876baf0265e to your computer and use it in GitHub Desktop.
Save samclane/7495aaad7edcc8fac29e8876baf0265e to your computer and use it in GitHub Desktop.
img = PhotoImage()
color_string = ''
for y in range(img.height()):
color_string += '{'
for x in range(img.width()):
color_string += GET_PIXEL_COLOR(x,y) + ' ' # GET_PIXEL_COLOR is whatever function you want to apply to the image
color_string += '} '
img.put(color_string, (0, 0, img.height(), img.width()))
@Gwitr
Copy link

Gwitr commented Mar 30, 2020

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment