[Image-SIG] Image.transform and antialias

Fredrik Lundh fredrik at pythonware.com
Thu Jul 9 13:23:05 CEST 2009

On Mon, Jul 6, 2009 at 10:19 PM, Skye WM<skyewm at gmail.com> wrote:

> I was wondering why Image's transform method doesn't support the ANTIALIAS
> filter while the methods resize and thumbnail do. I'm trying to crop and
> resize, and it'd be nice to do it all in one command.

The transform machinery works with arbitrary transformations, while
the ANTIALIAS machinery only works for rectangle-to-rectangle
mappings.  I guess this could be special-cased for the EXTENT
transform, or, perhaps better, resize could be made a bit more clever
it preceeded by a crop, but in the current release, you have to do it
in two steps.

(if you're primarily working from JPEG images on disk, it's probably
most efficient to do thumbnail followed by crop.  For other
formats/sizes, doing it the other way around might be more efficient.)


More information about the Image-SIG mailing list