[Image-SIG] Lanczos interpolation
fbuchinger at gmail.com
Tue Jun 2 13:58:38 CEST 2009
A good old trick is to work with intermediate images: resize the image using
the Bilinear method and produce an intermediate image that is about 25%
larger than the final image.
Then you can downscale the intermediate image using Lanczos.
This should give a much better performance than working just with Lanczos,
especially for large downscaling ratios (e.g. 10 Megapixel JPEG -> 1024x768)
Image quality shouldn't be affected too much by this method.
2009/5/12 Fredrik Lundh <fredrik at pythonware.com>
> On Sun, May 10, 2009 at 12:45 PM, David Yan <davidyan6 at gmail.com> wrote:
> > I want to resize an image Lanczos interpolation but I haven't found any
> > python module that can do so. Also, I'm not knowledgeable enough to
> > one myself. What's the best way I can do this? I use PIL currently but
> > resampling filters don't suit my needs (antialias is too slow, bilinear
> > bicubic produce aliasing when downsampling).
> ANTIALIAS is a Lanczos interpolation written in C, so it's not
> entirely obvious to me how you expect a Python version to be faster...
> Image-SIG maillist - Image-SIG at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG