[gimp/gimp-2-8] 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/gimp-2-8] plug-ins: Use the standardized value for deflate compression in tiff-save.
- Date: Fri, 20 Sep 2013 23:13:43 +0000 (UTC)
commit 91738c3b93f456a420334380bd0864a48e8dd0d3
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.
(cherry picked from commit 4bc51691e52e5813bb10b3e6e4b1e18cdeab5b6d)
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 3cdd806..7f8316d 100644
--- a/plug-ins/common/file-tiff-save.c
+++ b/plug-ins/common/file-tiff-save.c
@@ -303,13 +303,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;
}
@@ -829,7 +829,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);
@@ -1092,11 +1092,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]