Search code examples
pythonresizepython-imaging-library

Does Python PIL resize maintain the aspect ratio?


Does PIL resize to the exact dimensions I give it no matter what? Or will it try to keep the aspect ratio if I give it something like the Image.ANTIALIAS argument?


Solution

  • How do I resize an image using PIL and maintain its aspect ratio?

    Image.resize from PIL will do exactly as told. No behind scenes aspect ratio stuff.