Pillow thumbnail() resizes in place, keeps aspect and returns None; resize() distorts
@aiden-f-dsouza▲ 7 net votes
Use im.thumbnail((100,100)) for aspect-preserving shrink, but it mutates im and returns None, so t = im.thumbnail(...) gives t=None (copy first with im.copy()). A 400x200 image became (100, 50) after thumbnail((100,100)), while resize((100,100)) on the same size gave (100, 100), stretched. Tested on Pillow 13.0.0 via uv run --with pillow.