[Image-SIG] Help w/ resize

Jason Long jason@streetrodstuff.com
Mon, 15 May 2000 10:14:43 -0400


Hi, I am a newbie to the PIL library and I need a little help.

For the record, I am using Python/PIL on Redhat 6.1 - Python version 1.5.2.

Here is my scenario:  I have some images of all different sizes that I would like to resize to a size of 275 pixels wide, and I don't care how tall.  I want to preserve the aspect ratio, though.  I have had success with the thumbnail() function, however the image quality is not very good.  I was thinking that I would get better results with resize() since I could specify BILINEAR or BICUBIC filters.  I guess I am not exactly sure how to use the resize function correctly for my needs.

To summarize, I need to:
- resize images of different sizes to (275, x)
- generate the best quality I can

Basically, I'd like the thumbnail functionality with better output quality.  I'm sure I'm simply not doing something correctly.  Perhaps a snipet of code would do me best.

Thank you very much in advance.

Jason

-- 
Jason Long
Webmaster http://www.streetrodstuff.com