[gimp/gimp-2-10] plug-ins: fix #3757 Exporting invalid tiffs: Missing required "ImageLength" field.



commit 4226a05fd5a95b9d7a6eddd81e9cd17d10096630
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri Oct 23 17:39:09 2020 -0400

    plug-ins: fix #3757 Exporting invalid tiffs: Missing required "ImageLength" field.
    
    Because of Exif.Thumbnail.* tags file-tiff-save saved an invalid extra page in
    exported tif images. Removing these tags fixed this for me.
    
    (cherry picked from commit 7957653e9827f091edd63f6d6fab13fc9d755135)

 plug-ins/file-tiff/file-tiff-save.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index fc2a393f99..ce80cbe98d 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -907,6 +907,8 @@ save_metadata (GFile                 *file,
           && (*tag)[strlen ("Exif.SubImage")] >= '0'
           && (*tag)[strlen ("Exif.SubImage")] <= '9')
         gexiv2_metadata_clear_tag (GEXIV2_METADATA (metadata), *tag);
+      if (g_str_has_prefix (*tag, "Exif.Thumbnail"))
+        gexiv2_metadata_clear_tag (GEXIV2_METADATA (metadata), *tag);
     }
 
   gimp_metadata_set_bits_per_sample (metadata, saved_bpp);


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