diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 7d4b6d9b3..73d98e721 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -2,4 +2,15 @@ from tester import * from PIL import Image -success() +def test_quad(): + # one simple quad transform, equivalent to scale & crop upper left quad + im = lena('RGB') + (w,h) = im.size + transformed = im.transform(im.size, Image.QUAD, + (0,0,0,h/2, + w/2,h/2,w/2,0), # ul -> ccw around quad + Image.BILINEAR) + + scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0,0,w,h)) + + assert_image_equal(transformed, scaled, 10)