[Image-SIG] Unable to get PIL to load jpeg images

Mosley Peter Peter.Mosley at sentencing-guidelines.gsi.gov.uk
Tue Feb 7 15:38:37 CET 2006


Something went wrong with my previous post - try again.  I posted this query
on comp.lang.python and received a reply suggesting I try this mailing list.

I'm still wrestling with Python / Tkinter / PIL.  I have almost got it to
work - on a Fedora Core 1 system I can now display images in a Tkinter
window.  But I also run a Fedora Core 3 system, and when I tried the same
procedures I get the following errors:- 

[kpeter at localhost jpgTest]$ python pil_jpg.py 
Exception in Tkinter callback 
Traceback (most recent call last): 
  File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__ 
    return self.func(*args) 
  File "pil_jpg.py", line 26, in do_something 
    a.thumbnail((200,150)) 
  File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1422, in
thumbnail 
    self.load() 
  File "/usr/lib/python2.3/site-packages/PIL/ImageFile.py", line 180, in
load 
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig) 
  File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 328, in
_getdecoder 
    raise IOError("decoder %s not available" % decoder_name) 
IOError: decoder jpeg not available 

I am running Python 2.3.4, PIL 1.1.5 on a Fedora Core 3 system.  I know the
code is ok, as it runs quite happily under FC1 and Windows.  I've searched
around for clues, and found a few references to this error message, but
quite frankly don't understand what they are saying. 

Searching around for files that look as if they may be the jpeg libraries I
can find 

/usr/lib/libjpeg.so.62.0.0, and a symbolic link /usr/lib/libjpeg.so.62. 

I think I somehow have to configure PIL to recognise these, but I am not
sure and anyway don't know how to do this. 
Can anyone help? 

Peter 




The original of this email was scanned for viruses by the Government Secure Intranet (GSi) virus scanning service supplied exclusively by Cable & Wireless in partnership with MessageLabs.

On leaving the GSi this email was certified virus-free


More information about the Image-SIG mailing list