@@ -32,6 +32,8 @@ def make_thumbnail2(data, w=360, h=240): |
||
| 32 | 32 |
im = Image.open(BytesIO(data)) |
| 33 | 33 |
fmt = im.format.lower() |
| 34 | 34 |
width, height = im.size |
| 35 |
+ if width <= w and height <= h: |
|
| 36 |
+ return data |
|
| 35 | 37 |
if width > height: |
| 36 | 38 |
thumb_width, thumb_height = w, height * w / width |
| 37 | 39 |
else: |