Getting PIL to work for Windows
Colin Meeks
colin at programmedintegration.com
Mon Nov 6 13:09:35 EST 2000
More information about the Python-list mailing list
Mon Nov 6 13:09:35 EST 2000
- Previous message (by thread): How do you create constants?/immutable dicts
- Next message (by thread): Getting PIL to work for Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Dale all sorted now. Now to get converting my 300 images to thumbails :-) Colin "Dale Strickland-Clark" <dale at out-think.NOSPAMco.uk> wrote in message news:36qd0t4rhe01c2rhd4agjne27q6qqpn130 at 4ax.com... > "Colin Meeks" <colin at programmedintegration.com> wrote: > > >Thanks for that, I found the solution at > >http://x65.deja.com/getdoc.xp?AN=657505052&CONTEXT=973512335.2040332299&hit n > >um=3 > > > >however I still have a problem. When I execute the following code : > > > >import Image > > > >outfile = "image10_tn" > >Image.open("image10.jpg").resize(128,128).save(outfile, "JPEG") > > > >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:\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? > > > >Colin > > > > Resize takes two arguments, the first should be a tuple, the second a > filter. > > So you should be using something like: > > resize((128, 128), Image.BILINEAR) > > It's all in the doc under resize! > > -- > Dale Strickland-Clark > Out-Think Ltd > Business Technology Consultants > >
- Previous message (by thread): How do you create constants?/immutable dicts
- Next message (by thread): Getting PIL to work for Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list