2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-23 15:51:52 +00:00
troggle/expo/imagekit_specs.py

24 lines
527 B
Python
Raw Normal View History

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]