From e565a6b73b70f670335c4a095992eab26a1bfbf9 Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Thu, 2 Jul 2009 20:43:18 +0100 Subject: [svn] Renaming troggle.expo to troggle.core. To do this, used: perl -p -i -e "s/expo(?=[\s\.']+)/core/g" `find -name \*.py` and then manually checked each change (had to remove a couple) --- core/imagekit_specs.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 core/imagekit_specs.py (limited to 'core/imagekit_specs.py') diff --git a/core/imagekit_specs.py b/core/imagekit_specs.py new file mode 100644 index 0000000..fd2e0a1 --- /dev/null +++ b/core/imagekit_specs.py @@ -0,0 +1,22 @@ +from imagekit.specs import ImageSpec +from imagekit import processors + +class ResizeThumb(processors.Resize): + width = 100 + crop = False + +class ResizeDisplay(processors.Resize): + width = 600 + +#class EnhanceThumb(processors.Adjustment): + #contrast = 1.2 + #sharpness = 2 + +class Thumbnail(ImageSpec): + access_as = 'thumbnail_image' + pre_cache = True + processors = [ResizeThumb] + +class Display(ImageSpec): + increment_count = True + processors = [ResizeDisplay] -- cgit v1.2.3