Only store compression types we can actually handle in the save options

2005-04-25  Manish Singh  <yosh@gimp.org>

        * plug-in/common/tiff.c: Only store compression types we can actually
        handle in the save options parasite. Fixes bug #301557.
This commit is contained in:
Manish Singh 2005-04-25 07:42:52 +00:00 committed by Manish Singh
parent 2556233e5a
commit 16c86d0dbd
2 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-04-25 Manish Singh <yosh@gimp.org>
* plug-in/common/tiff.c: Only store compression types we can actually
handle in the save options parasite. Fixes bug #301557.
2005-04-24 Sven Neumann <sven@gimp.org>
* app/base/temp-buf.c (generate_unique_tmp_filename): removed the

View file

@ -700,7 +700,22 @@ load_image (const gchar *filename)
if (!TIFFGetField (tif, TIFFTAG_COMPRESSION, &tmp))
save_vals.compression = COMPRESSION_NONE;
else
save_vals.compression = tmp;
{
switch (tmp)
{
case COMPRESSION_NONE:
case COMPRESSION_LZW:
case COMPRESSION_PACKBITS:
case COMPRESSION_DEFLATE:
case COMPRESSION_JPEG:
save_vals.compression = tmp;
break;
default:
save_vals.compression = COMPRESSION_NONE;
break;
}
}
parasite = gimp_parasite_new ("tiff-save-options", 0,
sizeof (save_vals), &save_vals);