From 388c1eacf6a2f87889446f27262e5e52716fdbae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Thu, 17 Dec 2009 16:56:34 +0100 Subject: [PATCH] =?utf8?q?Poprawienie=20filtra=20i=20zmniejszenie=20rozmia?= =?utf8?q?ru=20miniaturek=20logo=20sponsor=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- apps/sponsors/models.py | 2 +- apps/sponsors/processors.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/sponsors/models.py b/apps/sponsors/models.py index 7b52b76f9..598d5627b 100644 --- a/apps/sponsors/models.py +++ b/apps/sponsors/models.py @@ -13,7 +13,7 @@ class Sponsor(models.Model): _('logo'), upload_to='sponsors/sponsor/logo', thumbnail={ - 'size': (150, 75), + 'size': (120, 60), 'extension': 'png', 'options': ['upscale', 'pad', 'detail'], }) diff --git a/apps/sponsors/processors.py b/apps/sponsors/processors.py index d954bf622..8c3d74c6a 100644 --- a/apps/sponsors/processors.py +++ b/apps/sponsors/processors.py @@ -6,7 +6,8 @@ def add_padding(image, requested_size, opts): padded_image = Image.new('RGBA', requested_size, '#fff') width, height = image.size requested_width, requested_height = requested_size - padded_image.paste(image, (0, requested_height - height / 2)) + print 'whatever' + padded_image.paste(image, (0, (requested_height - height) / 2)) return padded_image return image -- 2.20.1