django-imagekit/imagekit/defaults.py

26 lines
609 B
Python
Raw Normal View History

2009-01-08 18:37:15 +00:00
""" Default ImageKit configuration """
2009-01-04 18:30:03 +00:00
from imagekit.specs import ImageSpec
from imagekit import processors
2009-12-19 16:01:54 +00:00
2009-01-04 18:30:03 +00:00
class ResizeThumbnail(processors.Resize):
2009-06-04 15:06:40 +00:00
width = 100
height = 50
2009-01-08 18:37:15 +00:00
crop = True
2009-12-19 16:01:54 +00:00
2009-01-04 18:30:03 +00:00
class EnhanceSmall(processors.Adjustment):
2009-01-04 17:38:06 +00:00
contrast = 1.2
sharpness = 1.1
2009-12-19 16:01:54 +00:00
2009-01-08 20:04:20 +00:00
class SampleReflection(processors.Reflection):
size = 0.5
background_color = "#000000"
class PNGFormat(processors.Format):
format = 'PNG'
extension = 'png'
2009-12-19 16:01:54 +00:00
2009-01-04 18:42:25 +00:00
class DjangoAdminThumbnail(ImageSpec):
access_as = 'admin_thumbnail'
processors = [ResizeThumbnail, EnhanceSmall, SampleReflection, PNGFormat]