photoblog/specs.py @ 444fa384fab8

Got a working photoblog (almost).
author Steve Losh <steve@stevelosh.com>
date Sat, 14 Feb 2009 12:39:39 -0500
parents 1f2356294a8e
children 91f05965e207
from imagekit.specs import ImageSpec
from imagekit import processors

class ResizeThumb(processors.Resize):
    height = 50

class ResizeDisplay(processors.Resize):
    width = 550

class EnchanceThumb(processors.Adjustment): 
    contrast = 1.2
    sharpness = 1.1

class Thumbnail(ImageSpec):
    access_as = 'thumbnail'
    pre_cache = True
    processors = [ResizeThumb, EnchanceThumb]

class Display(ImageSpec):
    increment_count = True
    processors = [ResizeDisplay]