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
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to