diff --git a/ChangeLog b/ChangeLog index c1c4c60341..a2a6a3fb92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-25 Manish Singh + + * 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 * app/base/temp-buf.c (generate_unique_tmp_filename): removed the diff --git a/plug-ins/common/tiff.c b/plug-ins/common/tiff.c index 3ddf5e57f6..4d604e3e53 100644 --- a/plug-ins/common/tiff.c +++ b/plug-ins/common/tiff.c @@ -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);