2014-07-07 21:03:50 +04:00
|
|
|
from helper import unittest, PillowTestCase
|
2012-10-16 00:26:38 +04:00
|
|
|
|
|
|
|
from PIL import Image
|
|
|
|
from PIL import ImageTransform
|
|
|
|
|
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
class TestImageTransform(PillowTestCase):
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
def test_sanity(self):
|
|
|
|
im = Image.new("L", (100, 100))
|
|
|
|
|
|
|
|
seq = tuple(range(10))
|
|
|
|
|
|
|
|
transform = ImageTransform.AffineTransform(seq[:6])
|
|
|
|
im.transform((100, 100), transform)
|
|
|
|
transform = ImageTransform.ExtentTransform(seq[:4])
|
|
|
|
im.transform((100, 100), transform)
|
|
|
|
transform = ImageTransform.QuadTransform(seq[:8])
|
|
|
|
im.transform((100, 100), transform)
|
|
|
|
transform = ImageTransform.MeshTransform([(seq[:4], seq[:8])])
|
|
|
|
im.transform((100, 100), transform)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|
|
|
|
|
|
|
|
# End of file
|