Задать вопрос

Тел: +7 965 3737 888

437

Просмотров

1

Ответов

sorl.thumbnail processor: white background

<p>If you want to resize transparent PNGs with the {% thumbnail %} templatetag, they'll sometimes get an ugly black background that looks even more ugly on a white background. This processor puts the image on a white background. You can simply change the background color by replacing white with any other color.</p>
<p>To use this filter simple put the following two lines of code in your settings file:</p>
from sorl.thumbnail.defaults import PROCESSORS as THUMBNAIL_PROCESSORS
THUMBNAIL_PROCESSORS = ('path.to.white_background',) + THUMBNAIL_PROCESSORS

Вопрос полезен? Да0/Нет0
file_3023.py(286.0б)
None

Ответы (1):

Ответxhenxhe:24.07.2010
Ответ полезен? Да0/Нет0

Did not work for me. jpg thumbs were bad, png thumbs did not resize.