diff --git a/Tests/images/issue_2278.tif b/Tests/images/issue_2278.tif new file mode 100644 index 000000000..adac046db Binary files /dev/null and b/Tests/images/issue_2278.tif differ diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py index 2360d4fa9..9c29c7cd3 100644 --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -230,6 +230,14 @@ class TestFileTiffMetadata(PillowTestCase): self.fail("Should not be struct value error there.") self.assertIn(33432, info) + def test_PhotoshopInfo(self): + im = Image.open('Tests/images/issue_2278.tif') + + self.assertIsInstance(im.tag_v2[34377], bytes) + out = self.tempfile('temp.tiff') + im.save(out) + reloaded = Image.open(out) + self.assertIsInstance(reloaded.tag_v2[34377], bytes) if __name__ == '__main__': unittest.main()