Merge branch 'kaedroho-fix-fill-filter-zerodivisionerror'

pull/812/head
Matt Westcott 2014-11-12 11:27:08 +00:00
commit dcb80153c8
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -7,6 +7,7 @@ Changelog
* Fix: Added missing jQuery UI sprite files, causing collectstatic to throw errors (most reported on Heroku)
* Fix: Page system check for on_delete actions of ForeignKeys was throwing false positives when page class decends from an abstract class (Alejandro Giacometti)
* Fixed a regression where form builder submissions containing a number field would fail with a JSON serialisation error
* Fix: Resizing an image with a focal point equal to the image size would result in a divide-by-zero error
0.8.1 (05.11.2014)

Wyświetl plik

@ -17,3 +17,4 @@ Bug fixes
* Added missing jQuery UI sprite files, causing collectstatic to throw errors (most reported on Heroku)
* Page system check for on_delete actions of ForeignKeys was throwing false positives when page class decends from an abstract class (Alejandro Giacometti)
* Fixed a regression where form builder submissions containing a number field would fail with a JSON serialisation error
* Resizing an image with a focal point equal to the image size would result in a divide-by-zero error

Wyświetl plik

@ -165,7 +165,7 @@ class BaseImageBackend(object):
crop_min_height = crop_min_scale / crop_aspect_ratio
# Sometimes, the focal point may be bigger than the image...
if not crop_min_scale > crop_max_scale:
if not crop_min_scale >= crop_max_scale:
# Calculate max crop closeness to prevent upscaling
max_crop_closeness = max(
1 - (fl_width - crop_min_width) / (crop_max_width - crop_min_width),