mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Correct duplicate EXIF tags: http://www.exiv2.org/tags.html
This commit is contained in:
parent
ec2a225fff
commit
d866a29bd8
|
@ -67,8 +67,8 @@ TAGS = {
|
|||
0x0213: "YCbCrPositioning",
|
||||
0x0214: "ReferenceBlackWhite",
|
||||
0x1000: "RelatedImageFileFormat",
|
||||
0x1001: "RelatedImageLength", # FIXME / Dictionary contains duplicate keys
|
||||
0x1001: "RelatedImageWidth", # FIXME \ Dictionary contains duplicate keys
|
||||
0x1001: "RelatedImageLength",
|
||||
0x1002: "RelatedImageWidth",
|
||||
0x828d: "CFARepeatPatternDim",
|
||||
0x828e: "CFAPattern",
|
||||
0x828f: "BatteryLevel",
|
||||
|
|
|
@ -295,6 +295,15 @@ class TestFileJpeg(PillowTestCase):
|
|||
# Default save quality is 75%, so a tiny bit of difference is alright
|
||||
self.assert_image_similar(img, Image.open(tempfile), 1)
|
||||
|
||||
def test_no_duplicate_0x1001_tag(self):
|
||||
# Arrange
|
||||
from PIL import ExifTags
|
||||
tag_ids = dict(zip(ExifTags.TAGS.values(), ExifTags.TAGS.keys()))
|
||||
|
||||
# Assert
|
||||
self.assertEqual(tag_ids['RelatedImageLength'], 0x1001)
|
||||
self.assertEqual(tag_ids['RelatedImageWidth'], 0x1002)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user