[Image-SIG] ImageTk.PhotoImage: DLL load failed: The specified module could not be found.

Jean-Paul Miéville jpmieville at gmail.com
Tue Jul 7 14:02:36 CEST 2009


Hello,

I have an problem with ImageTk.PhotoImage.

When I try to use it with for example with the following script:

import ImageTk
import Image
import tkFileDialog

imgFile = tkFileDialog.askopenfilename()
if imgFile:
    image = Image.open(imgFile)
    chart = ImageTk.PhotoImage(image)

I got the following error:
Traceback (most recent call last):
  File "C:\Python\PythonScript\Test\Script1.py", line 9, in <module>
    chart = ImageTk.PhotoImage(image)
  File "C:\Python25\Lib\site-packages\PIL\ImageTk.py", line 116, in __init__
    self.paste(image)
  File "C:\Python25\Lib\site-packages\PIL\ImageTk.py", line 181, in paste
    import _imagingtk
ImportError: DLL load failed: The specified module could not be found.

The file _imagingtk is present in the
path C:\Python25\Lib\site-packages\PIL\.

I don't understand what is wrong. I am using ActivePython 2.5.4.4
(ActiveState Software Inc.)base on Python 2.5.4 (r254:67916, Apr 27 2009,
15:41:14).

Thanks for your help,

Jean-Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090707/0c659c4f/attachment.htm>


More information about the Image-SIG mailing list