mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Image.point tests for Float LUT
This commit is contained in:
parent
ea0a31d9fe
commit
78d2618064
|
@ -31,6 +31,16 @@ class TestImagePoint(PillowTestCase):
|
|||
im = lena("I")
|
||||
im.point(list(range(256))*256, 'L')
|
||||
|
||||
def test_f_lut(self):
|
||||
""" Tests for floating point lut of 8bit gray image """
|
||||
im = lena('L')
|
||||
lut = [0.5 * float(x) for x in range(256)]
|
||||
|
||||
out = im.point(lut, 'F')
|
||||
|
||||
int_lut = [x//2 for x in range(256)]
|
||||
self.assert_image_equal(out.convert('L'), im.point(int_lut, 'L'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user