aboutsummaryrefslogtreecommitdiff
path: root/tools/info.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-11 22:51:52 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-12 00:22:20 +0100
commit121c63e35e667a841380f4d405cc47ce0f50b2e9 (patch)
tree76d97392c8c6c88445c689313c026ce0817d6e75 /tools/info.h
parent1bd5cb02e74fafa5f4f87be39cf919efab03fe25 (diff)
downloadfiv-121c63e35e667a841380f4d405cc47ce0f50b2e9.tar.gz
fiv-121c63e35e667a841380f4d405cc47ce0f50b2e9.tar.xz
fiv-121c63e35e667a841380f4d405cc47ce0f50b2e9.zip
Add a basic tiffinfo utility
Also fix a few TIFF-related issues.
Diffstat (limited to 'tools/info.h')
-rw-r--r--tools/info.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/info.h b/tools/info.h
index 1872345..860af17 100644
--- a/tools/info.h
+++ b/tools/info.h
@@ -551,14 +551,15 @@ static struct tiff_entry tiff_entries[] = {
{}
}},
{"ReferenceBlackWhite", 532, NULL},
+ {"XMP", 700, NULL}, // Adobe XMP Specification Part 3 Table 12/13/39
{"ImageID", 32781, NULL}, // Adobe PageMaker 6.0 TIFF Technical Notes
{"Copyright", 33432, NULL},
+ // TODO(p): Extract IPTC DataSets, like we do directly with PSIRs.
+ {"IPTC", 33723, NULL}, // Adobe XMP Specification Part 3 Table 12/39
// TODO(p): Extract PSIRs, like we do directly with the JPEG segment.
{"Photoshop", 34377, NULL}, // Adobe XMP Specification Part 3 Table 12/39
{"Exif IFD Pointer", 34665, NULL}, // Exif 2.3
{"GPS Info IFD Pointer", 34853, NULL}, // Exif 2.3
- // TODO(p): Extract IPTC DataSets, like we do directly with PSIRs.
- {"IPTC", 37723, NULL}, // Adobe XMP Specification Part 3 Table 12/39
{"ImageSourceData", 37724, NULL}, // Adobe Photoshop TIFF Technical Notes
{}
};
@@ -886,8 +887,9 @@ parse_exif_subifds(struct tiffer *T, const struct tiffer_entry *entry,
offset < 0 || offset > UINT32_MAX || !tiffer_subifd(T, offset, &subT))
return jv_null();
- // The chain should correspond to the values in the entry,
- // we are not going to verify it.
+ // The chain should correspond to the values in the entry
+ // (TIFF Technical Note 1), we are not going to verify it.
+ // Note that Nikon NEFs do not follow this rule.
jv a = jv_array();
do a = jv_array_append(a, parse_exif_ifd(&subT, info));
while (tiffer_next_ifd(&subT));