mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
Merge pull request #1539 from wiredfool/issue_1526
Fix the definition of icc_profile in TiffTags
This commit is contained in:
commit
a0393ee3a0
|
@ -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),
|
||||
|
|
BIN
Tests/images/hopper.iccprofile_binary.tif
Normal file
BIN
Tests/images/hopper.iccprofile_binary.tif
Normal file
Binary file not shown.
|
@ -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__':
|
||||
|
|
Loading…
Reference in New Issue
Block a user