mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
fix test which relied on old bugs
This commit is contained in:
parent
5b8c8aa389
commit
2221a6467c
|
@ -1877,7 +1877,7 @@ class Image(object):
|
|||
xs = float(x1 - x0) / w
|
||||
ys = float(y1 - y0) / h
|
||||
method = AFFINE
|
||||
data = (xs, 0, x0 + xs/2, 0, ys, y0 + ys/2)
|
||||
data = (xs, 0, x0, 0, ys, y0)
|
||||
|
||||
elif method == PERSPECTIVE:
|
||||
data = data[0:8]
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -20,13 +20,13 @@ class TestImageGetData(PillowTestCase):
|
|||
return data[0], len(data), len(list(data))
|
||||
|
||||
self.assertEqual(getdata("1"), (0, 960, 960))
|
||||
self.assertEqual(getdata("L"), (25, 960, 960))
|
||||
self.assertEqual(getdata("I"), (25, 960, 960))
|
||||
self.assertEqual(getdata("F"), (25.0, 960, 960))
|
||||
self.assertEqual(getdata("RGB"), (((20, 20, 70), 960, 960)))
|
||||
self.assertEqual(getdata("RGBA"), ((20, 20, 70, 255), 960, 960))
|
||||
self.assertEqual(getdata("CMYK"), ((235, 235, 185, 0), 960, 960))
|
||||
self.assertEqual(getdata("YCbCr"), ((25, 153, 123), 960, 960))
|
||||
self.assertEqual(getdata("L"), (16, 960, 960))
|
||||
self.assertEqual(getdata("I"), (16, 960, 960))
|
||||
self.assertEqual(getdata("F"), (16.0, 960, 960))
|
||||
self.assertEqual(getdata("RGB"), (((11, 13, 52), 960, 960)))
|
||||
self.assertEqual(getdata("RGBA"), ((11, 13, 52, 255), 960, 960))
|
||||
self.assertEqual(getdata("CMYK"), ((244, 242, 203, 0), 960, 960))
|
||||
self.assertEqual(getdata("YCbCr"), ((16, 147, 123), 960, 960))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue
Block a user