torchbox/wagtail — pull request #797 by kaedroho (2014-11-10 16:15:05+00:00)
Title: Fixed ZeroDivisionError in fill filter

When a focal point matches the size of the image, the crop sizes are
also the same.

These sizes are subtracted from each other in the fill filter
(which would equal zero) and this number then gets used as the
denominator in a division causing the ZeroDivisionError to be raised.

The fix is simple, don't do any crop closeness calculations if the focal
point size equals the image size. Crop closeness wouldn't work anyway in
this case