Test PSD with and without ICC profile

This commit is contained in:
Hugo 2017-02-27 17:21:27 +02:00
parent 1a607bfd56
commit df2a031941

View File

@ -69,6 +69,18 @@ class TestImagePsd(PillowTestCase):
self.assertRaises(EOFError, lambda: im.seek(-1))
def test_icc_profile(self):
im = Image.open(test_file)
self.assertIn("icc_profile", im.info)
icc_profile = im.info["icc_profile"]
self.assertEqual(len(icc_profile), 3144)
def test_no_icc_profile(self):
im = Image.open("Tests/images/hopper_merged.psd")
self.assertNotIn("icc_profile", im.info)
if __name__ == '__main__':
unittest.main()