[gimp] plug-ins: Use the standardized value for deflate compression in tiff-save.
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: Use the standardized value for deflate compression in tiff-save.
- Date: Fri, 20 Sep 2013 23:13:48 +0000 (UTC)
commit cd4d5e6d32169e0d642010b992ad401244db354d
Author: Michael Henning <drawoc darkrefraction com>
Date: Fri Sep 20 19:05:18 2013 -0400
plug-ins: Use the standardized value for deflate compression in tiff-save.
Ironically, the standardized value is called COMPRESSION_ADOBE_DEFLATE,
while the vendor-specific value is called COMPRESSION_DEFLATE.
plug-ins/common/file-tiff-save.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/common/file-tiff-save.c b/plug-ins/common/file-tiff-save.c
index c5a18e9..fe5ba46 100644
--- a/plug-ins/common/file-tiff-save.c
+++ b/plug-ins/common/file-tiff-save.c
@@ -304,13 +304,13 @@ run (const gchar *name,
{
switch (param[5].data.d_int32)
{
- case 0: tsvals.compression = COMPRESSION_NONE; break;
- case 1: tsvals.compression = COMPRESSION_LZW; break;
- case 2: tsvals.compression = COMPRESSION_PACKBITS; break;
- case 3: tsvals.compression = COMPRESSION_DEFLATE; break;
- case 4: tsvals.compression = COMPRESSION_JPEG; break;
- case 5: tsvals.compression = COMPRESSION_CCITTFAX3; break;
- case 6: tsvals.compression = COMPRESSION_CCITTFAX4; break;
+ case 0: tsvals.compression = COMPRESSION_NONE; break;
+ case 1: tsvals.compression = COMPRESSION_LZW; break;
+ case 2: tsvals.compression = COMPRESSION_PACKBITS; break;
+ case 3: tsvals.compression = COMPRESSION_ADOBE_DEFLATE; break;
+ case 4: tsvals.compression = COMPRESSION_JPEG; break;
+ case 5: tsvals.compression = COMPRESSION_CCITTFAX3; break;
+ case 6: tsvals.compression = COMPRESSION_CCITTFAX4; break;
default: status = GIMP_PDB_CALLING_ERROR; break;
}
@@ -866,7 +866,7 @@ save_image (const gchar *filename,
TIFFSetField (tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField (tif, TIFFTAG_COMPRESSION, compression);
- if ((compression == COMPRESSION_LZW || compression == COMPRESSION_DEFLATE)
+ if ((compression == COMPRESSION_LZW || compression == COMPRESSION_ADOBE_DEFLATE)
&& (predictor != 0))
{
TIFFSetField (tif, TIFFTAG_PREDICTOR, predictor);
@@ -1098,11 +1098,11 @@ save_dialog (gboolean has_alpha,
G_CALLBACK (gimp_radio_button_update),
&tsvals.compression, tsvals.compression,
- _("_None"), COMPRESSION_NONE, NULL,
- _("_LZW"), COMPRESSION_LZW, NULL,
- _("_Pack Bits"), COMPRESSION_PACKBITS, NULL,
- _("_Deflate"), COMPRESSION_DEFLATE, NULL,
- _("_JPEG"), COMPRESSION_JPEG, NULL,
+ _("_None"), COMPRESSION_NONE, NULL,
+ _("_LZW"), COMPRESSION_LZW, NULL,
+ _("_Pack Bits"), COMPRESSION_PACKBITS, NULL,
+ _("_Deflate"), COMPRESSION_ADOBE_DEFLATE, NULL,
+ _("_JPEG"), COMPRESSION_JPEG, NULL,
_("CCITT Group _3 fax"), COMPRESSION_CCITTFAX3, &g3,
_("CCITT Group _4 fax"), COMPRESSION_CCITTFAX4, &g4,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]