Set pixels of the image to the colors given in data, which must be a string or a nested sequence of horizontal rows of pixel colors (for example "{red green} {blue yellow}").
tkinter/PhotoImage.put
PhotoImage.put