Getting PIL to work for Windows

Dale Strickland-Clark dale at out-think.NOSPAMco.uk
Sun Nov 5 21:47:15 EST 2000


"Colin Meeks" <colin at programmedintegration.com> wrote:

>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
>

This is a FAQ. The solution to which is also in the FAQ. I don't have
the URL handy and I don't remember the fix, but when I hit this
problem a while ago, I found the answer in Deja.com from a few months
ago.

I'm sure someone will be along shortly with a pointer if you don't
have any luck with this.
--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants





More information about the Python-list mailing list