mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
add test & comment
This commit is contained in:
parent
c9faa9caa5
commit
ad0a96c3fa
|
@ -274,7 +274,7 @@ def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)):
|
||||||
# kevin@cazabon.com
|
# kevin@cazabon.com
|
||||||
# http://www.cazabon.com
|
# http://www.cazabon.com
|
||||||
|
|
||||||
# No cropping/fit possible
|
# No cropping/fit possible. Prevents ZeroDivisionError @ liveAreaAspectRatio
|
||||||
if image.size == (1,1):
|
if image.size == (1,1):
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def test_sanity():
|
||||||
|
|
||||||
ImageOps.fit(lena("L"), (128, 128))
|
ImageOps.fit(lena("L"), (128, 128))
|
||||||
ImageOps.fit(lena("RGB"), (128, 128))
|
ImageOps.fit(lena("RGB"), (128, 128))
|
||||||
|
ImageOps.fit(lena("RGB").resize((1,1)), (35,35))
|
||||||
|
|
||||||
ImageOps.flip(lena("L"))
|
ImageOps.flip(lena("L"))
|
||||||
ImageOps.flip(lena("RGB"))
|
ImageOps.flip(lena("RGB"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user