forked from expo/troggle
8c68a8a0d7
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8336 by cucc @ 5/10/2009 11:05 PM
24 lines
527 B
Python
24 lines
527 B
Python
from imagekit.specs import ImageSpec
|
|
from imagekit import processors
|
|
|
|
class ResizeThumb(processors.Resize):
|
|
width = 100
|
|
height = 75
|
|
crop = True
|
|
|
|
class ResizeDisplay(processors.Resize):
|
|
width = 600
|
|
|
|
class EnhanceThumb(processors.Adjustment):
|
|
contrast = 1.2
|
|
sharpness = 1.1
|
|
|
|
class Thumbnail(ImageSpec):
|
|
access_as = 'thumbnail_image'
|
|
pre_cache = True
|
|
processors = [ResizeThumb, EnhanceThumb]
|
|
|
|
class Display(ImageSpec):
|
|
increment_count = True
|
|
processors = [ResizeDisplay]
|