Getting PIL to work for Windows
dale at out-think.NOSPAMco.uk
Mon Nov 6 18:31:24 CET 2000
"Colin Meeks" <colin at programmedintegration.com> wrote:
>Thanks for that, I found the solution at
>however I still have a problem. When I execute the following code :
>outfile = "image10_tn"
>I get the following error :
>Traceback (innermost last):
> File "C:\python\Pythonwin\pywin\framework\scriptutils.py", line 311, in
> exec codeObject in __main__.__dict__
> File "C:\test\thumb.py", line 4, in ?
> Image.open("image10.jpg").resize(128,128).save(outfile, "JPEG")
> File "C:\PYTHON\PIL\Image.py", line 629, in resize
> raise ValueError, "unknown resampling filter"
>ValueError: unknown resampling filter
>I based my code on the example from the PIL manual. The JPEG is 1024x768.
>Anybody have any ideas?
Resize takes two arguments, the first should be a tuple, the second a
So you should be using something like:
resize((128, 128), Image.BILINEAR)
It's all in the doc under resize!
Business Technology Consultants
More information about the Python-list