Getting PIL to work for Windows

Colin Meeks colin at programmedintegration.com
Sun Nov 5 17:26:01 EST 2000


I've just downloaded the Windows distribution of PIL and am having touble
getting it to work.  I can import the module OK, but when I try to resize
something I get an error.  The code I am using is :

    import Image

    outfile = "image10_tn"
    Image.open("image10.jpg").resize(128).save(outfile, "JPEG")

When I run this I get the following error

Traceback (innermost last):
  File "C:\python\Pythonwin\pywin\framework\scriptutils.py", line 311, in
RunScript
    exec codeObject in __main__.__dict__
  File "C:\CJB\Meeks Website\images\Wedding\reception\thumb.py", line 4, in
?
    Image.open("image10.jpg").resize(128).save(outfile, "JPEG")
  File "C:\PYTHON\PIL\Image.py", line 626, in resize
    self.load()
  File "C:\PYTHON\PIL\ImageFile.py", line 125, in load
    self.load_prepare()
  File "C:\PYTHON\PIL\ImageFile.py", line 175, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "C:\PYTHON\PIL\Image.py", line 40, in __getattr__
    raise ImportError, "The _imaging C module is not installed"
ImportError: The _imaging C module is not installed

Anyone know how I get the _imaging C module (I assume this is the
_imaging.dll file) installed.

Thanks in advance

Colin





More information about the Python-list mailing list