mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Add test for the ImageOps.scale function
This commit is contained in:
parent
c0eb87cac3
commit
7af3c4c3bc
|
@ -78,6 +78,16 @@ class TestImageOps(PillowTestCase):
|
||||||
ImageOps.equalize(i.convert("P"))
|
ImageOps.equalize(i.convert("P"))
|
||||||
ImageOps.equalize(i.convert("RGB"))
|
ImageOps.equalize(i.convert("RGB"))
|
||||||
|
|
||||||
|
def test_scale(self):
|
||||||
|
# Test the scaling function
|
||||||
|
i = hopper("L").resize((50,50))
|
||||||
|
|
||||||
|
newimg = ImageOps.scale(i,2)
|
||||||
|
self.assertEqual(newimg.size, (100, 100))
|
||||||
|
|
||||||
|
newimg = ImageOps.scale(i,0.5)
|
||||||
|
self.assertEqual(newimg.size, (25, 25))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user