[gimp] Bug 765336: CRITICAL warning loading a thumbnail-less...
- From: Massimo Valentini <mvalentini src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp] Bug 765336: CRITICAL warning loading a thumbnail-less...
 
- Date: Thu, 21 Apr 2016 16:48:59 +0000 (UTC)
 
commit 5e5fb7776ce6651c026d36d9145c3ef63ffbb4d2
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Thu Apr 21 18:47:54 2016 +0200
    Bug 765336: CRITICAL warning loading a thumbnail-less...
    
    tiff GIMP saved
    
    the plugin unconditionally used to add a TIFFTAG_SUBIFD
    whose number_of_sub_IFDs was wrong when the user asked
    not to include a thumbnail.
    
    Reloading the file in GIMP resulted in:
    
    ** (file-tiff:1): CRITICAL **: Directory SubImage1 with 18761 entries considered invalid; not read.
 plug-ins/file-tiff/file-tiff-save.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index 0f39d04..706b663 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -524,7 +524,8 @@ save_image (GFile        *file,
     }
 
   /* Set TIFF parameters. */
-  TIFFSetField (tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, sub_IFDs_offsets);
+  if (tsvals->save_thumbnail)
+    TIFFSetField (tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, sub_IFDs_offsets);
   TIFFSetField (tif, TIFFTAG_SUBFILETYPE, 0);
   TIFFSetField (tif, TIFFTAG_IMAGEWIDTH, cols);
   TIFFSetField (tif, TIFFTAG_IMAGELENGTH, rows);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]