Remove duplicate tag caused by typo in spec: http://www.asmail.be/msg0055321032.html

This commit is contained in:
hugovk 2014-08-26 15:51:37 +03:00
parent 5d9107ee4c
commit 952d1d5bf5
2 changed files with 8 additions and 4 deletions

View File

@ -240,7 +240,7 @@ TAGS = {
45579: "YawAngle",
45580: "PitchAngle",
45581: "RollAngle",
# Adobe DNG
50706: "DNGVersion",
50707: "DNGBackwardVersion",
@ -255,7 +255,6 @@ TAGS = {
50716: "BlackLevelDeltaV",
50717: "WhiteLevel",
50718: "DefaultScale",
50741: "BestQualityScale", # FIXME! Dictionary contains duplicate keys 50741
50719: "DefaultCropOrigin",
50720: "DefaultCropSize",
50778: "CalibrationIlluminant1",
@ -279,7 +278,8 @@ TAGS = {
50737: "ChromaBlurRadius",
50738: "AntiAliasStrength",
50740: "DNGPrivateData",
50741: "MakerNoteSafety", # FIXME! Dictionary contains duplicate keys 50741
50741: "MakerNoteSafety",
50780: "BestQualityScale",
#ImageJ
50838: "ImageJMetaDataByteCounts", # private tag registered with Adobe

View File

@ -8,7 +8,7 @@ tag_ids = dict(zip(TiffTags.TAGS.values(), TiffTags.TAGS.keys()))
class TestFileTiffMetadata(PillowTestCase):
def test_rt_metadata(self):
""" Test writing arbitray metadata into the tiff image directory
""" Test writing arbitrary metadata into the tiff image directory
Use case is ImageJ private tags, one numeric, one arbitrary
data. https://github.com/python-pillow/Pillow/issues/291
"""
@ -86,6 +86,10 @@ class TestFileTiffMetadata(PillowTestCase):
self.assertEqual(
value, reloaded[tag], "%s didn't roundtrip" % tag)
def test_no_duplicate_50741_tag(self):
self.assertEqual(tag_ids['MakerNoteSafety'], 50741)
self.assertEqual(tag_ids['BestQualityScale'], 50780)
if __name__ == '__main__':
unittest.main()