![]() ![]() = PhotoImage(data=open('test.png'). If I delete format='png' in the source code, the traceback will become: Exception in Tkinter callback ![]() TclError: image format "png" is not supported Self.tk.call(('image', 'create', imgtype, name,) options) Image._init_(self, 'photo', name, cnf, master, **kw)įile "C:\Python27\lib\lib-tk\Tkinter.py", line 3279, in _init_ = PhotoImage(data=open('test.png').read(), format='png')įile "C:\Python27\lib\lib-tk\Tkinter.py", line 3323, in _init_ The Traceback is: Exception in Tkinter callbackįile "C:\Python27\lib\lib-tk\Tkinter.py", line 1486, in _call_įile "C:\Documents and Settings\St\client\GUI.py", line 150, in showrboxįile "C:\Documents and Settings\St\client\GUI.py", line 197, in _init_įile "C:\Documents and Settings\St\client\GUI.py", line 203, in refresh_vcode Not only that, but my iPhone keeps incessantly. If Finder doesn't recognize an item (if it can't be matched with an installed application that can open it) or preview icons are turned off then it displays a generic icon for the file. You have to turn off the 'Optimize' option at 'iCloud Photo Library', an even then, the old images on my iPhone continue to 'prefer' the jpg when sharing, only the newer ones (after I turned it off) are keeping the transparency. For storing line drawings, text, and iconic graphics at a smaller file size, GIF or PNG are better choices because they are lossless. I also tested on several other machines (include windows and linux), it failed all the time. (4 points) 1:10 PM in response to Alyssa June. But when I run it on my windows machine, it fails. This code runs correctly on my Linux machine. So I have some code like this: = PhotoImage(data=open('test.png').read(), format='png') I am using Tkinter to write a GUI and want to display a png file in a Tkiner.Label. ![]()
0 Comments
Leave a Reply. |