Merge pull request #1539 from wiredfool/issue_1526

Fix the definition of icc_profile in TiffTags
This commit is contained in:
Hugo van Kemenade 2015-11-16 10:23:41 +02:00
commit a0393ee3a0
3 changed files with 9 additions and 1 deletions

View File

@ -133,7 +133,7 @@ TAGS_V2 = {
# FIXME add more tags here
34665: ("ExifIFD", 3, 1),
34675: ('ICCProfile', 7, 1),
34675: ('ICCProfile', 7, 0),
# MPInfo
45056: ("MPFVersion", 7, 1),

Binary file not shown.

View File

@ -158,6 +158,14 @@ class TestFileTiffMetadata(PillowTestCase):
self.assert_(type(im.info['icc_profile']) is not type(tuple))
self.assertEqual(im.info['icc_profile'], reloaded.info['icc_profile'])
def test_iccprofile_binary(self):
# https://github.com/python-pillow/Pillow/issues/1526
# We should be able to load this, but probably won't be able to save it.
im = Image.open('Tests/images/hopper.iccprofile_binary.tif')
self.assertEqual(im.tag_v2.tagtype[34675], 1)
self.assert_(im.info['icc_profile'])
if __name__ == '__main__':