SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.37k stars 312 forks source link

Parameter 'quality' is not passed to pillow if WEBP format is used #612

Closed mireq closed 1 year ago

mireq commented 1 year ago

After commit https://github.com/SmileyChris/easy-thumbnails/commit/7b9719e379916b19945623b8d3299a279e38c395, parameter 'quality' is not passed to pillow for any format except of 'JPEG'.

jrief commented 1 year ago

wouldn't it be better to rewrite line 53 to

    if format in ['JPEG', 'WEBP']:
        …
mireq commented 1 year ago

JPEG branch has some specific JPEG handling code, for example conversion from RGBA to RGB because jpeg don't support alpha, but webp can store alpha.

mireq commented 1 year ago

My updated pull request removes quantity option only for TIFF format. I think, this is best solution for now.

jrief commented 1 year ago

Please read my follow-up comment on this.

GitHub changed something in their action scripts, which causes the unit tests to fail.

jrief commented 1 year ago

Can you please retry with version 2.8.5. This should fix the regression introduced in 2.8.4.

mireq commented 1 year ago

It's OK now