[gimp/gimp-2-10] plug-ins: Iptc.Application2.Headline is not a repeatable tag
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: Iptc.Application2.Headline is not a repeatable tag
- Date: Sun, 24 Oct 2021 17:46:00 +0000 (UTC)
commit 3ed924d7311c8e565c78adcdea6dc1ea1791b33c
Author: Jacob Boerema <jgboerema gmail com>
Date: Sun Oct 24 12:53:37 2021 -0400
plug-ins: Iptc.Application2.Headline is not a repeatable tag
See issue #7408 where this is causing a crash when using gexiv 0.14.0
in combination with trying to save it as a multiple tag with an empty list.
According to https://exiv2.org/iptc.html the tag Iptc.Application2.Headline
is not repeatable so we will set mode to "single.
In addition to that I added comments to explain the differences in the
meaning of "single" and "multi" between the list of Xmp tags and Iptc tags.
(cherry picked from commit b070c6fba64d16aa16c35bac17d123cb84b5dd41)
plug-ins/metadata/metadata-tags.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/metadata/metadata-tags.c b/plug-ins/metadata/metadata-tags.c
index 29c1e0f4b8..601751f2ba 100644
--- a/plug-ins/metadata/metadata-tags.c
+++ b/plug-ins/metadata/metadata-tags.c
@@ -27,6 +27,13 @@
#include "metadata-tags.h"
+/* The meaning of "single" and "multi" here denotes whether it is used in a
+ * single line or a multi line edit field.
+ * Depending on it's xmp type multi line can be saved as either:
+ * - one tag of type text, possibly including newlines
+ * - an array of tags of the same type for seq and bag, where each line in
+ * the multi line edit will be one item in the array
+ */
const metadata_tag default_metadata_tags[] =
{
/* Description */
@@ -134,12 +141,16 @@ const metadata_tag default_metadata_tags[] =
};
const gint n_default_metadata_tags = G_N_ELEMENTS (default_metadata_tags);
+/* Then meaning of "single" and "multi" below is a little different than above.
+ * "single" - for iptc tags that can appear only once,
+ * "multi" - for iptc tags that are repeatable, i.e. can appear multiple times.
+ */
const metadata_tag equivalent_metadata_tags[] =
{
{ "Iptc.Application2.DateCreated", "single", 10, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 0
{ "Iptc.Application2.TransmissionReference", "single", 12, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 1
{ "Iptc.Application2.SpecialInstructions", "single", 13, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 2
- { "Iptc.Application2.Headline", "multi", 11, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 3
+ { "Iptc.Application2.Headline", "single", 11, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 3
{ "Iptc.Application2.Category", "single", 56, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 4
{ "Iptc.Application2.City", "single", 20, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 5
{ "Iptc.Application2.ProvinceState", "single", 21, TAG_TYPE_IPTC, GIMP_XMP_NONE }, // 6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]