Export to GitHub

django-photologue - issue #90

height=0 with "crop to fit" enabled crashes


Posted on Dec 13, 2008 by Helpful Giraffe

What steps will reproduce the problem? 1. create photo size 2. set height to 0 3. enable "crop to fit"

What is the expected output? What do you see instead? i get an exception: tile cannot extend outside image because the 0-height gets passed on to PIL. photologue should handle this situation gracefully, even if "crop to fit" with height=0 doesn't make much sense..

What version of the product are you using? On what operating system? revision 354, debian linux, PIL 1.1.6

Please provide any additional information below.

Attachments

Comment #1

Posted on Dec 23, 2008 by Happy Giraffe

PhotoSize will now throw a ValueError on save if crop=True and width and height are zero.

Status: Fixed