[gimp] Bug 758909: Gimp cannot open some tif files it exports



commit 63805dfcf2ead56d846758c09eebfbd97088478a
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Tue Dec 29 18:47:56 2015 +0100

    Bug 758909: Gimp cannot open some tif files it exports
    
    Clear TIFFTAG_MIN/MAXSAMPLEVALUE because exiv2 saves
    them with the wrong type and the original values could
    be invalid

 plug-ins/file-tiff/file-tiff.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff.c b/plug-ins/file-tiff/file-tiff.c
index 66c31c5..0a9a1db 100644
--- a/plug-ins/file-tiff/file-tiff.c
+++ b/plug-ins/file-tiff/file-tiff.c
@@ -45,6 +45,7 @@
 #include "config.h"
 
 #include <tiffio.h>
+#include <gexiv2/gexiv2.h>
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
@@ -464,6 +465,13 @@ run (const gchar      *name,
                 {
                   GFile *file;
 
+                  /* See bug 758909: clear TIFFTAG_MIN/MAXSAMPLEVALUE because
+                   * exiv2 saves them with wrong type and the original values
+                   * could be invalid
+                   */
+                  gexiv2_metadata_clear_tag (metadata, "Exif.Image.0x0118");
+                  gexiv2_metadata_clear_tag (metadata, "Exif.Image.0x0119");
+
                   gimp_metadata_set_bits_per_sample (metadata, saved_bpp);
 
                   if (tsvals.save_exif)


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