I am using Django and easy-thumbnails 2.3. My intention is to take an image, scale it down so that it fits a square and fill the empty area with white color in case of non-square original images. Also in case of transparent images the transparency shall be changed to white.
My settings.py contains the following lines:
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'easy_thumbnails.processors.scale_and_crop',
'easy_thumbnails.processors.filters',
'easy_thumbnails.processors.background',
)
THUMBNAIL_ALIASES = {
'':{
'square_image': {'background':'#fff','replace_alpha':'#fff','size':(200,200)},
},
}
THUMBNAIL_TRANSPARENCY_EXTENSION = 'jpg'
I've tried some debugging and everything seems to work quite well and makes sense until the code reaches a line 318 in the background-processor function of easy-thumbnails processors.py
:
im = colorspace(im, replace_alpha=background, **kwargs)
Here the debugger returns straight to the method that was calling background(im, size, background=None, **kwargs)
.
Is there anything wrong with my configuration of square_image
in THUMBNAIL_ALIASES? Could it be anything else?