[gimp] libgimpbase: fix #2253 saving metadata failed if Pentax PreviewOffset present in exif tags.



commit 9069d812ef67eb542b7876c075809eeac85ddbd1
Author: Jacob Boerema <jgboerema gmail com>
Date:   Thu Oct 15 15:02:57 2020 -0400

    libgimpbase: fix #2253 saving metadata failed if Pentax PreviewOffset present in exif tags.
    
    Partially based on the comments of Massimo Valentini we block all Pentax and PentaxDng
    exif Preview tags from being exported. We leave finding a more flexible solution for
    problematic tags to a future contributor.

 libgimpbase/gimpmetadata.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index 06089527ab..d8c0dd27f5 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -135,7 +135,15 @@ static const gchar *unsupported_tags[] =
   "Exif.Image.XPSubject",
   "Exif.Image.DNGVersion",
   "Exif.Image.DNGBackwardVersion",
-  "Exif.Iop"
+  "Exif.Iop",
+  /* FIXME Even though adding the tags below fixes the issue it's not very flexible.
+     It might be better in the long run if there was a way for a user to configure which
+     tags to block or a way for us to detect problems with tags before writing them. */
+  /* Issues #1367, #2253. Offending tag is PreviewOffset but the other Preview tags
+     (PreviewResolution, PreviewLength, PreviewImageBorders) also make no sense because
+     we are not including a Pentax specific preview image. */
+  "Exif.Pentax.Preview",
+  "Exif.PentaxDng.Preview"
 };
 
 static const guint8 minimal_exif[] =


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]