2012-12-07 04:48:09 +00:00
|
|
|
from .registry import register
|
|
|
|
|
from .processors import Thumbnail as ThumbnailProcessor
|
|
|
|
|
from .specs import ImageSpec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Thumbnail(ImageSpec):
|
2013-05-11 12:12:29 +00:00
|
|
|
def __init__(self, width=None, height=None, anchor=None, crop=None, upscale=None, **kwargs):
|
2012-12-07 04:48:09 +00:00
|
|
|
self.processors = [ThumbnailProcessor(width, height, anchor=anchor,
|
2013-05-11 12:12:29 +00:00
|
|
|
crop=crop, upscale=upscale)]
|
2012-12-07 04:48:09 +00:00
|
|
|
super(Thumbnail, self).__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
|
2013-02-01 06:21:01 +00:00
|
|
|
register.generator('imagekit:thumbnail', Thumbnail)
|