]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 224: for now, don't save partial JBIG pages as it leads to a corrupt TIFF
authorLee Howard <faxguy@howardsilvan.com>
Sat, 30 Jul 2005 00:03:49 +0000 (00:03 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Sat, 30 Jul 2005 00:03:49 +0000 (00:03 +0000)
faxd/CopyQuality.c++

index d31ee91f003614c2208637c9bfc713d2eeed9bdf..8458c2b2857e57495d29fbb1352cbb280cec61aa 100644 (file)
@@ -616,12 +616,14 @@ FaxModem::writeECMData(TIFF* tif, u_char* buf, u_int cc, const Class2Params& par
        memcpy(recvRow, (const char*) buf, cc);
        recvRow += cc;
     }
-    if (seq & 2 && !recvEOLCount && params.df > DF_2DMMR) {
+    if (seq & 2 && !recvEOLCount && (params.df ==  DF_JPEG_GREY || params.df == DF_JPEG_COLOR)) {
        /*
         * We didn't detect an image length marker (DNL/NEWLEN).  So
         * we use the session parameters to guess at one, and we hope that
         * the eventual viewing decoder can cope with things if the data
         * is short.
+        *
+        * This approach doesn't seem to work with JBIG, so for now we only do it with JPEG.
         */
        u_int len, res;
        switch (params.ln) {