]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Disable JPEG support when compiling with older libtiff [bug 829]
authorPatrice Fournier <pfournier@ifax.com>
Sat, 4 Nov 2006 07:51:10 +0000 (07:51 +0000)
committerPatrice Fournier <pfournier@ifax.com>
Sat, 4 Nov 2006 07:51:10 +0000 (07:51 +0000)
Thanks Lee and Aidan.

CHANGES
faxd/CopyQuality.c++
faxd/ModemConfig.c++

diff --git a/CHANGES b/CHANGES
index 6f35c5d3850eccd206d1527316103bc1118a5f07..c02344fe50312a1bd7d6cbe5d6536fab564ef0e2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog for HylaFAX 4.3.1
 
+* Disable JPEG support when compiling with older libtiff (3 Nov 2006)
 * Use old style lock files for OpenServer 6 (20 Oct 2006)
 * Always update on-disk qfiles for jobs when state changes to running (19 Oct 2006)
 * Change how we compile shared objects for Solaris DSO support (12 Oct 2006)
index f2a1ff5df5216c8b5fa7f98f9741285c60eff5dd..71a518b43d4d5103bb8af3149f3c5cf1a6c021aa 100644 (file)
@@ -388,8 +388,12 @@ FaxModem::recvSetupTIFF(TIFF* tif, long, int fillOrder, const fxStr& id)
     TIFFSetField(tif, TIFFTAG_SUBFILETYPE,     FILETYPE_PAGE);
     TIFFSetField(tif, TIFFTAG_IMAGEWIDTH,      (uint32) params.pageWidth());
     if (params.df == DF_JPEG_COLOR || params.df == DF_JPEG_GREY) {
-       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE,        8);
+#ifdef PHOTOMETRIC_ITULAB
        TIFFSetField(tif, TIFFTAG_PHOTOMETRIC,          PHOTOMETRIC_ITULAB);
+#else
+       printf("Attempt to save JPEG Grey/Colour data without PHOTOMETRIC_ITULAB support.  This should not happen.\n");
+#endif
+       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE,        8);
        TIFFSetField(tif, TIFFTAG_PLANARCONFIG,         PLANARCONFIG_CONTIG);
        // libtiff requires IMAGELENGTH to be set before SAMPLESPERPIXEL, 
        // or StripOffsets and StripByteCounts will have SAMPLESPERPIXEL values
index 88ca80f3418422b16767e51288782c13369fd776..9b722bc0dc6184f7902625013fbfec859e38361e 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "t.30.h"
 #include "config.h"
+#include "tiffio.h"
 
 #include <ctype.h>
 
@@ -711,10 +712,12 @@ ModemConfig::setConfigItem(const char* tag, const char* value)
        class2SendRTC = getBoolean(value);
     else if (streq(tag, "class1ecmsupport"))
        class1ECMSupport = getBoolean(value);
+#ifdef PHOTOMETRIC_ITULAB
     else if (streq(tag, "class1greyjpegsupport"))
        class1GreyJPEGSupport = getBoolean(value);
     else if (streq(tag, "class1colorjpegsupport"))
        class1ColorJPEGSupport = getBoolean(value);
+#endif
     else if (streq(tag, "class1jbigsupport"))
         class1JBIGSupport = getJBIGSupport(value);
     else if (streq(tag, "class1persistentecm"))