Return-Path: <tiff-admin@remotesensing.org>
Received: from zed.skynet.be (zed.skynet.be [195.238.3.233])
        by six.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i1HKOW09012019
        for <joris.at.lebbeke@skynet.be>; Tue, 17 Feb 2004 21:24:32 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by zed.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i1HKNdjx026266
        for <joris.at.lebbeke@skynet.be>; Tue, 17 Feb 2004 21:23:44 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i1HKKkl10346;
	Tue, 17 Feb 2004 15:20:52 -0500
Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i1HKI4l10235
	for <tiff@remotesensing.org>; Tue, 17 Feb 2004 15:18:04 -0500
Received: from sdn-ap-008watacop0490.dialsprint.net ([65.176.73.236] helo=bilbo.x101.com)
	by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1)
	id 1AtBfJ-000457-00
	for tiff@remotesensing.org; Tue, 17 Feb 2004 12:17:58 -0800
Received: from bilbo.x101.com (localhost.localdomain [127.0.0.1])
	by bilbo.x101.com (8.11.6/8.11.6) with ESMTP id i1HKHrR30472
	for <tiff@remotesensing.org>; Tue, 17 Feb 2004 12:17:53 -0800
From: Lee Howard <faxguy@howardsilvan.com>
To: tiff@remotesensing.org
Message-ID: <20040217201753.GQ14115@bilbo.x101.com>
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Mailer: Balsa 1.4.1
Lines: 73
Subject: [Tiff] strange encoding in T.4 G3-2D faxed TIFF
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Tue, 17 Feb 2004 12:17:53 -0800
X-UIDL: ab09d907bbece0564d7daebb0dbb4a70

Occassionally I receive faxes from a particular sender that seems to 
prefix the real TIFF data with a bunch of these:

101000000000000001

I'm guessing that's what it looks like in binary, anyway, because this 
is what the TIFF decoder (HylaFAX's TIFF decoder is very similar to 
libtiff's tif_fax3.c, tif_fax3.h) tells me:

RECV: begin page
RECV/CQ: Invalid WhiteTable code word, row 0, x 9
RECV/CQ: Bad 1D pixel count, row 0, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 1, x 9
RECV/CQ: Bad 1D pixel count, row 1, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 2, x 9
RECV/CQ: Bad 1D pixel count, row 2, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 3, x 9
RECV/CQ: Bad 1D pixel count, row 3, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 4, x 9
RECV/CQ: Bad 1D pixel count, row 4, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 5, x 9
RECV/CQ: Bad 1D pixel count, row 5, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 6, x 9
RECV/CQ: Bad 1D pixel count, row 6, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 7, x 9
RECV/CQ: Bad 1D pixel count, row 7, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 8, x 9
RECV/CQ: Bad 1D pixel count, row 8, got 9, expected 1728
RECV/CQ: Invalid WhiteTable code word, row 9, x 9
RECV/CQ: Bad 1D pixel count, row 9, got 9, expected 1728
RECV/CQ: Bad 1D pixel count, row 1104, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1105, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1106, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1107, got 0, expected 1728
RECV/CQ: Adjusting for RTC found at row 1104
RECV: 1104 total lines, 10 bad lines, 10 consecutive bad lines
RECV: REJECT page quality, 10-line run (max 5)
RECV: end page

Sometimes the EOL comes first, so I guess it looks like this:

000000000000110100

and the decoder tells me this:

RECV: begin page
RECV/CQ: Bad 1D pixel count, row 0, got 9, expected 1728
RECV/CQ: Bad 1D pixel count, row 1, got 9, expected 1728
RECV/CQ: Bad 1D pixel count, row 2, got 9, expected 1728
RECV/CQ: Bad 1D pixel count, row 3, got 9, expected 1728
RECV/CQ: Bad 1D pixel count, row 1094, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1095, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1096, got 0, expected 1728
RECV/CQ: Bad 1D pixel count, row 1097, got 0, expected 1728
RECV/CQ: Adjusting for RTC found at row 1094
RECV: 1094 total lines, 4 bad lines, 4 consecutive bad lines
RECV: end page

Fax machines, fax softwares, and Class 2 faxmodem firmwares notoriously 
do dumb things to TIFF data - for example, some stick misplaced EOLs at 
the beginning of MMR (G4) data.  So it's not surprising for me to see 
another fax machine doing yet another silly thing here.

Ultimately the TIFF is viewable anyway, so it seems that the initial 
"bad lines" are merely superfluous.  So my inclination is to simply 
ignore these "bad lines" (so as to not let them cause the page 
rejection that you see above).  However, I'd like to make sure that's 
the "right thing" to do.  Does anyone know what these "bad lines" 
really are?

Thanks.

Lee.
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
