mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Tight similarity tests for XYZ conversion
This commit is contained in:
parent
04e3f585b0
commit
d707cb3692
BIN
Tests/images/hopper-XYZ.png
Normal file
BIN
Tests/images/hopper-XYZ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -181,8 +181,12 @@ class TestImageConvert(PillowTestCase):
|
|||
# Assert
|
||||
self.assertEqual(converted_im.mode, mode)
|
||||
self.assertEqual(converted_im.size, im.size)
|
||||
target = Image.open('Tests/images/hopper-XYZ.png')
|
||||
if converted_im.mode == 'RGB':
|
||||
self.assert_image_similar(converted_im, im, 33)
|
||||
self.assert_image_similar(converted_im, target, 3)
|
||||
else:
|
||||
self.assert_image_similar(converted_im, target.split()[0], 1)
|
||||
|
||||
|
||||
matrix_convert('RGB')
|
||||
matrix_convert('L')
|
||||
|
|
Loading…
Reference in New Issue
Block a user