This commit is contained in:
orlnub123 2020-02-09 00:19:53 +00:00 committed by Andrew Murray
parent 2e716de63d
commit 64c08f4dba

View File

@ -34,14 +34,14 @@ def test_aspect():
im.thumbnail((100, 100))
assert im.size == (100, 50)
im = Image.new("L", (256, 128))
im.thumbnail((100, 50))
assert im.size == (100, 50)
im = Image.new("L", (64, 64))
im.thumbnail((100, 100))
assert im.size == (64, 64)
im = Image.new("L", (128, 128))
im.thumbnail((100, 100))
assert im.size == (100, 100)
im = Image.new("L", (256, 162)) # ratio is 1.5802469136
im.thumbnail((33, 33))
assert im.size == (33, 21) # ratio is 1.5714285714
@ -62,7 +62,7 @@ def test_aspect():
def test_float():
im = Image.new("L", (128, 128))
im.thumbnail((99.9, 99.9))
assert im.size == (100, 100)
assert im.size == (99, 99)
def test_no_resize():