Merge pull request #5425 from radarhere/iptc

Changed TIFF tag 33723 length to 1
This commit is contained in:
Hugo van Kemenade 2021-04-25 11:23:52 +03:00 committed by GitHub
commit 23efd39b99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -179,6 +179,12 @@ def test_no_duplicate_50741_tag():
assert TAG_IDS["BestQualityScale"] == 50780
def test_iptc(tmp_path):
out = str(tmp_path / "temp.tiff")
with Image.open("Tests/images/hopper.Lab.tif") as im:
im.save(out)
def test_empty_metadata():
f = io.BytesIO(b"II*\x00\x08\x00\x00\x00")
head = f.read(8)

View File

@ -178,7 +178,7 @@ TAGS_V2 = {
532: ("ReferenceBlackWhite", RATIONAL, 6),
700: ("XMP", BYTE, 0),
33432: ("Copyright", ASCII, 1),
33723: ("IptcNaaInfo", UNDEFINED, 0),
33723: ("IptcNaaInfo", UNDEFINED, 1),
34377: ("PhotoshopInfo", BYTE, 0),
# FIXME add more tags here
34665: ("ExifIFD", LONG, 1),