I want to display an encoded jpeg image file with Tkinter. But when I run my code it tells me “couldnt identify image file”. What am I doing wrong?
import Tkinter, base64
from PIL import ImageTk, Image
root = Tkinter.Tk()
ImageEncoded = #### the images data ####
ImageForTK = ImageTk.PhotoImage(data = ImageEncoded) ##### this is where the error occurs
panel = Tkinter.Label(root, image = ImageForTk)
panel.pack(side = “bottom”, fill = “both”, expand = “yes”)
root.mainloop()