Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"
- From: "Eric Brunel" <see.signature@xxxxxxx>
- Date: Mon, 30 Jun 2008 11:26:27 +0200
On Sun, 29 Jun 2008 13:34:37 +0200, defn noob <circularfunc@xxxxxxxx> wrote:
from Tkinter import *[snip]
import os
master = Tk()
w = Canvas(master, width=800, height=600)
print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg')
im = PhotoImage(file = 'C:/users/saftarn/desktop/images/blob4.jpg')
True
Traceback (most recent call last):
File "C:/Python25/Progs/ImageVideoSearch/imId.py", line 9, in
<module>
im = PhotoImage(file = 'C:/users/me/desktop/images/blob4.jpg')
File "C:\Python25\lib\lib-tk\Tkinter.py", line 3270, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Python25\lib\lib-tk\Tkinter.py", line 3226, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
TclError: couldn't recognize data in image file "C:/users/me/desktop/
images/blob4.jpg"
it has worked before opening and displaying a file like this, anything
to do with python 2.52, upgraded from 2.5.1
Did it? Because AFAIK, tcl/tk has never natively recognized any other image format than PPM/PGM and GIF... No JPG, no PNG...
--
python -c "print ''.join([chr(154 - ord(c)) for c in 'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"
.
- References:
- Prev by Date: Re: Using just the Mako part of Pylons?
- Next by Date: Re: List Performance
- Previous by thread: Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"
- Next by thread: Classical nurses site
- Index(es):
Relevant Pages
|