This commit is contained in:
znerol 2016-06-25 14:35:06 +00:00 committed by GitHub
commit 0b8f3d46d0
3 changed files with 4 additions and 2 deletions

View File

@ -554,6 +554,8 @@ class ImageFileDirectory_v2(collections.MutableMapping):
if info.length == 1:
if legacy_api and self.tagtype[tag] in [5, 10]:
values = values,
elif not legacy_api and self.tagtype[tag] == 1:
values = values,
dest[tag], = values
else:
dest[tag] = values

View File

@ -152,7 +152,7 @@ TAGS_V2 = {
# FIXME add more tags here
34665: ("ExifIFD", SHORT, 1),
34675: ('ICCProfile', 7, 0),
34675: ('ICCProfile', 7, 1),
34853: ('GPSInfoIFD', 1, 1),
# MPInfo

View File

@ -175,7 +175,7 @@ class TestFileTiffMetadata(PillowTestCase):
im.save(out)
reloaded = Image.open(out)
self.assert_(type(im.info['icc_profile']) is not type(tuple))
self.assertNotEqual(type(im.info['icc_profile']), tuple)
self.assertEqual(im.info['icc_profile'], reloaded.info['icc_profile'])
def test_iccprofile_binary(self):