Avec python, pour réduire une image (i.e créer une thumbnail), il existe la fonction thumbnail du module pillow, exemple:

from PIL import Imageim = Image.open("Mona-Lisa.JPEG")size = (100,100)im.thumbnail(size)im.save('image_thumbnail_01.jpg')
Note: pour changer le rapport entre la largeur et la hauteur d'une image voir cet article.
Références
| Liens | Site |
|---|---|
| thumbnail | pillow doc |
| resize | pillow doc |
| What is the difference between Image.resize and Image.thumbnail in Pillow-Python | stackoverflow |
| Does Python PIL resize maintain the aspect ratio? | stackoverflow |
| How do I resize an image using PIL and maintain its aspect ratio? | stackoverflow |
| How to Resize a Photo with Python | stackoverflow |
