[gimp] Bug 768950 - TIFF private tags should not generate warnings.



commit 3cb70e67cce56960ab1055e6ef7f72eff1abf55c
Author: Jehan <jehan girinstud io>
Date:   Sat Jul 23 18:07:58 2016 +0200

    Bug 768950 - TIFF private tags should not generate warnings.
    
    This is a regression from bug 131975. Any unknown tag over 32768 is not
    an error. This is a reserved zone where it is allowed to create custom
    tags.
    The warning indeed changed since libtiff 4.0.0alpha where it has become:
    "Unknown field with tag %d (0x%x) encountered"
    This explains why it was not recognized anymore.

 plug-ins/file-tiff/file-tiff-io.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-io.c b/plug-ins/file-tiff/file-tiff-io.c
index 76159ee..11339d3 100644
--- a/plug-ins/file-tiff/file-tiff-io.c
+++ b/plug-ins/file-tiff/file-tiff-io.c
@@ -122,6 +122,7 @@ tiff_io_warning (const gchar *module,
 {
   gint tag = 0;
 
+  /* Before libtiff 4.0.0alpha. */
   if (! strcmp (fmt, "%s: unknown field with tag %d (0x%x) encountered"))
     {
       va_list ap_test;
@@ -133,7 +134,9 @@ tiff_io_warning (const gchar *module,
       tag = va_arg (ap_test, int);
     }
   /* for older versions of libtiff? */
-  else if (! strcmp (fmt, "unknown field with tag %d (0x%x) ignored"))
+  else if (! strcmp (fmt, "unknown field with tag %d (0x%x) ignored") ||
+           /* Since libtiff 4.0.0alpha. */
+           ! strcmp (fmt, "Unknown field with tag %d (0x%x) encountered"))
     {
       va_list ap_test;
 


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