diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-07-02 20:43:18 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-07-02 20:43:18 +0100 |
commit | e565a6b73b70f670335c4a095992eab26a1bfbf9 (patch) | |
tree | a93c4069e8d858b77e9527e794305f97946d21b1 /core/imagekit_specs.py | |
parent | 5baddea474b068ece9d6b93bcc90f4d76f97e5a3 (diff) | |
download | troggle-e565a6b73b70f670335c4a095992eab26a1bfbf9.tar.gz troggle-e565a6b73b70f670335c4a095992eab26a1bfbf9.tar.bz2 troggle-e565a6b73b70f670335c4a095992eab26a1bfbf9.zip |
[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)
Diffstat (limited to 'core/imagekit_specs.py')
-rw-r--r-- | core/imagekit_specs.py | 22 |
1 files changed, 22 insertions, 0 deletions
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] |