From df2a0319414d9b352def799e42513870f78cf989 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 27 Feb 2017 17:21:27 +0200 Subject: [PATCH] Test PSD with and without ICC profile --- Tests/test_file_psd.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py index dd75a31c9..04a171cbb 100644 --- a/Tests/test_file_psd.py +++ b/Tests/test_file_psd.py @@ -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()