There are two ways to achieve this:
1. Calculate the aspect ratio yourself, then resize the picture accordingly, e.g. (not tested)
aspect_ratio = float(im.height) / im.width im.resize(target_width, target_width * aspect_ratio)
2. Use the thumbnail function. It creates an image with the given size, while padding the edges to preserve aspect ratio, when needed.
Markus
[EMAIL PROTECTED] schrieb:
Is KEEP ASPECT RATIO available when I resize a picture? Thanks for help Lad. _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
