From c144108396ba587ea9c778ffec9fe3a2a3b3a725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Klein?= Date: Wed, 20 Jul 2011 15:49:37 +0200 Subject: [PATCH] Fix : resize need int values, append int conversion in thumbnail method --- PIL/Image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 77a532afa..09e035065 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1547,8 +1547,8 @@ class Image: # preserve aspect ratio x, y = self.size - if x > size[0]: y = max(y * size[0] / x, 1); x = size[0] - if y > size[1]: x = max(x * size[1] / y, 1); y = size[1] + if x > size[0]: y = int(max(y * size[0] / x, 1)); x = int(size[0]) + if y > size[1]: x = int(max(x * size[1] / y, 1)); y = int(size[1]) size = x, y if size == self.size: