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.
This commit is contained in:
Massimo Valentini 2016-04-21 18:47:54 +02:00
parent e62d46ae80
commit 5e5fb7776c
1 changed files with 2 additions and 1 deletions

View File

@ -524,6 +524,7 @@ save_image (GFile *file,
}
/* Set TIFF parameters. */
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);