mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Add tag info for iccprofile, fixes #1462
This commit is contained in:
parent
ea437d36ca
commit
7729d88995
|
@ -133,6 +133,7 @@ TAGS_V2 = {
|
|||
|
||||
# FIXME add more tags here
|
||||
34665: ("ExifIFD", 3, 1),
|
||||
34675: ('ICCProfile', 7, 1),
|
||||
|
||||
# MPInfo
|
||||
45056: ("MPFVersion", 7, 1),
|
||||
|
@ -171,7 +172,6 @@ TAGS = {347: 'JPEGTables',
|
|||
33437: 'FNumber',
|
||||
33723: 'IptcNaaInfo',
|
||||
34377: 'PhotoshopInfo',
|
||||
34675: 'ICCProfile',
|
||||
34850: 'ExposureProgram',
|
||||
34852: 'SpectralSensitivity',
|
||||
34853: 'GPSInfoIFD',
|
||||
|
|
BIN
Tests/images/hopper.iccprofile.tif
Normal file
BIN
Tests/images/hopper.iccprofile.tif
Normal file
Binary file not shown.
|
@ -148,6 +148,17 @@ class TestFileTiffMetadata(PillowTestCase):
|
|||
except struct.error:
|
||||
self.fail("Should not be struct errors there.")
|
||||
|
||||
def test_iccprofile(self):
|
||||
# https://github.com/python-pillow/Pillow/issues/1462
|
||||
im = Image.open('Tests/images/hopper.iccprofile.tif')
|
||||
out = self.tempfile('temp.tiff')
|
||||
|
||||
im.save(out)
|
||||
reloaded = Image.open(out)
|
||||
self.assert_(type(im.info['icc_profile']) is not type(tuple))
|
||||
self.assertEqual(im.info['icc_profile'], reloaded.info['icc_profile'])
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user