python-imaging/Pillow — pull request #267 by chrispbailey (2013-07-01 11:41:09+00:00)
Title: Better fix for ZeroDivisionError in ImageOps.fit for image.size height is 1

pterk's earlier fix (https://github.com/python-imaging/Pillow/pull/255) does not really solve the problem - which is a ZeroDivisionError if the height of the image is 1px (regardless of width). I've disable the -1 size reduction when calculating the liveArea dimensions - this allows fit(..) to be applied to any image size.