When manipulating photoimage objects, with:
import tkinter as tk img = tk.PhotoImage(file=\"myFile.gif\") for x in range(0,1000): for y in range(0,1000):
Try constructing a 2d array of colors and call put with that array as parameter.
put
Like this:
import tkinter as tk img = tk.PhotoImage(file="myFile.gif") # "#%02x%02x%02x" % (255,0,0) means 'red' line = '{' + ' '.join(["#%02x%02x%02x" % (255,0,0)] * 1000) + '}' img.put(' '.join([line] * 1000))