Added reading of IFD tag type

This commit is contained in:
Andrew Murray 2020-10-14 23:37:54 +11:00
parent 74e91090de
commit 1a3367400c
4 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -385,6 +385,10 @@ class TestFileTiff:
ret = ifd.load_double(data, False)
assert ret == (8.540883223036124e194, 8.540883223036124e194)
def test_ifd_tag_type(self):
with Image.open("Tests/images/ifd_tag_type.tiff") as im:
assert 0x8825 in im.tag_v2
def test_seek(self):
filename = "Tests/images/pil136.tiff"
with Image.open(filename) as im:

View File

@ -665,6 +665,7 @@ class ImageFileDirectory_v2(MutableMapping):
(TiffTags.SIGNED_LONG, "l", "signed long"),
(TiffTags.FLOAT, "f", "float"),
(TiffTags.DOUBLE, "d", "double"),
(TiffTags.IFD, "L", "long"),
],
)
)

View File

@ -69,6 +69,7 @@ SIGNED_LONG = 9
SIGNED_RATIONAL = 10
FLOAT = 11
DOUBLE = 12
IFD = 13
TAGS_V2 = {
254: ("NewSubfileType", LONG, 1),