Skip to content

Commit

Permalink
Merge 4c52696 into 89901e0
Browse files Browse the repository at this point in the history
  • Loading branch information
znerol committed Apr 16, 2016
2 parents 89901e0 + 4c52696 commit 220e7af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions PIL/TiffImagePlugin.py
Expand Up @@ -554,6 +554,8 @@ def _setitem(self, tag, value, legacy_api):
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
Expand Down
2 changes: 1 addition & 1 deletion PIL/TiffTags.py
Expand Up @@ -152,7 +152,7 @@ def lookup(tag):

# FIXME add more tags here
34665: ("ExifIFD", SHORT, 1),
34675: ('ICCProfile', 7, 0),
34675: ('ICCProfile', 7, 1),
34853: ('GPSInfoIFD', 1, 1),

# MPInfo
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_file_tiff_metadata.py
Expand Up @@ -175,7 +175,7 @@ def test_iccprofile(self):

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):
Expand Down

0 comments on commit 220e7af

Please sign in to comment.