Created
November 13, 2018 21:27
-
-
Save samclane/7495aaad7edcc8fac29e8876baf0265e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool!