+ 1

What's wrong in this code, iam getting an error as "can't recognize image data"

import os from tkinter import * os.chdir("/storage/emulated/0/Fonts") print(os.getcwd()) r=Tk() a=PhotoImage(file="Jayesh.jpg") a.pack() r.mainloop()

25th Mar 2019, 12:49 PM
Mohd Adnan
Mohd Adnan - avatar
1 ответ
+ 4
PhotoImage works only with gif format. With JPG you need to use some things else. http://effbot.org/tkinterbook/photoimage.htm
27th Mar 2019, 2:00 PM
Tibor Santa
Tibor Santa - avatar