Test for issue #2278

This commit is contained in:
Eric Soroos 2017-09-14 16:25:11 +00:00 committed by wiredfool
parent 843f8b2a6b
commit 56e490fe7c
2 changed files with 8 additions and 0 deletions

BIN
Tests/images/issue_2278.tif Normal file

Binary file not shown.

View File

@ -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()