diff --git a/Tests/images/hopper-XYZ.png b/Tests/images/hopper-XYZ.png new file mode 100644 index 000000000..194d24540 Binary files /dev/null and b/Tests/images/hopper-XYZ.png differ diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index 011f23bf8..e641a99f2 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -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')