From: Marek Stępniowski Date: Thu, 17 Dec 2009 15:56:34 +0000 (+0100) Subject: Poprawienie filtra i zmniejszenie rozmiaru miniaturek logo sponsorów. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/388c1eacf6a2f87889446f27262e5e52716fdbae Poprawienie filtra i zmniejszenie rozmiaru miniaturek logo sponsorów. --- 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