Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx012.isp.belgacom.be (inmx012.isp.belgacom.be [195.238.3.90])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j0QJBHGs022938
        for <joris.at.lebbeke@skynet.be>; Wed, 26 Jan 2005 20:11:17 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx012.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j0QJAqsh024650
        for <joris.at.lebbeke@skynet.be>; Wed, 26 Jan 2005 20:10:56 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 5E449603739; Wed, 26 Jan 2005 14:10:17 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from data-tech.com (unknown [66.129.74.52])
	by xserve.flids.com (Postfix) with ESMTP id 61B5C60370F
	for <tiff@remotesensing.org>; Wed, 26 Jan 2005 14:10:15 -0500 (EST)
Received: from DEEPGAP ([10.0.0.54])
	by data-tech.com (data-tech.com [10.1.1.1]) (MDaemon.PRO.v7.2.2.R)
	with ESMTP id md50000280056.msg
	for <tiff@remotesensing.org>; Wed, 26 Jan 2005 14:09:48 -0500
Message-ID: <015401c503da$7e5c28d0$3600000a@DEEPGAP>
From: "Eric J Witherspoon" <ericj@data-tech.com>
To: <tiff@remotesensing.org>
Date: Wed, 26 Jan 2005 14:08:59 -0500
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0151_01C503B0.94E8CF60"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Spam-Processed: data-tech.com, Wed, 26 Jan 2005 14:09:48 -0500
	(not processed: message from trusted or authenticated source)
X-MDRemoteIP: 10.0.0.54
X-Return-Path: ericj@data-tech.com
X-MDaemon-Deliver-To: tiff@remotesensing.org
X-MDAV-Processed: data-tech.com, Wed, 26 Jan 2005 14:09:52 -0500
Subject: [Tiff] TIFF CLASS F Revision 4 and EOLs at beginning of strip
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: b52ebde895a08cff4dcd2a3cdd8fff8b

This is a multi-part message in MIME format.


------=_NextPart_000_0151_01C503B0.94E8CF60
Content-Type: text/plain; format=flowed; charset="Windows-1252";
	reply-type=original
Content-Transfer-Encoding: 7bit

I have enjoyed using the tiff lib and I am quite impressed with it's 
flexibility
and ease of use.

I have recently run into some Class F files that return EOF and EOL errors.
I have attached one to this message.

The returned error strings are:
C:\img\b_a.tif: Premature EOF at scanline 100 (x 0).
C:\img\b_a.tif: Premature EOL at scanline 100 (got 0, expected 600).
C:\img\b_a.tif: Premature EOL at scanline 200 (got 0, expected 600).
C:\img\b_a.tif: Premature EOL at scanline 300 (got 0, expected 600).
C:\img\b_a.tif: Premature EOL at scanline 400 (got 0, expected 600).
C:\img\b_a.tif: Premature EOL at scanline 500 (got 0, expected 600).

This results in an image that has one missing line after the first strip
(rows per strip = 100) and white stripes through it every strip thereafter.

This file has T3Options: EOL padding (4 = 0x4) set. But this parameter
seems to be ignored.

I use the simple TIFFRGBAImageGet to access the image data.

My initial thought was that this image was corrupt or written incorrectly...
But it turns out that starting a strip with an EOL is part of Revision 4 of 
the
Tiff Class F recommendation.  This does not show up in the Tiff Spec 6.0. 
But I have
noticed that several other readers view this file correctly.
Unfortunately the version of libtiff that I am using (3.7.1) does not handle
these EOL characters correctly when at the beginning of a strip.

Below I have included the second technical note of revision 4
about EOL placement in strips.

Any suggestions of how to add this support would be appreciated.
I find the nested macros used in tif_fax3.c Fax3Decode1D from tif_fax3.h
quite daunting. I thought that maybe the SYNC_EOL(EOF1D); macro would
be a good place to start...

-Eric Witherspoon

--------------------------------------

TIFF CLASS F March 1, 1992
Revision 4

under
TECHNICAL POINTS
2.  EOL Placement in Strips
    As illustrated in FIGURE 1/T.4 in Recommendation T.4 (the
    "Blue Book"), facsimile documents begin with an EOL (End-
    of-Line) code. The last line of the image is not
    terminated by an EOL. Expressed differently, EOL's are
    actually BOL's (Beginning-of-Line).

    When a page is stored as a multi-strip image, one must
    consider where to divide scanline data. With the RTC not
    included, treating EOL codes like BOL codes permits all
    strips to have a consistent format: RowsPerStrip  EOL-
    prefixed lines of data. Consequently, multi-strip Class F
    images must break data such that each strip begins with an
    EOL code. This is easily done if these codes are treated
    like BOL codes. 

------=_NextPart_000_0151_01C503B0.94E8CF60
Content-Type: application/octet-stream;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="attachments.zip"

UEsDBBQAAAAIADpxOjIjMNLRNwsAALoQAAAHADwAYm9sLnRpZgoAIAAAAAAAAAAAAAD4D7SwA8UB
APgPtLADxQEA+A+0sAPFAU5VFABOVUNYBwBiAG8AbAAuAHQAaQBmAE1X3W9cRxW/u+O9a/mexSZx
Nr5jK1okxzj+wqx3Z/2Qh01bkPOBtUqcsLHvJnfpteu67q0RIMHbtQ0GIaSOTZpaqBKbEpVVsdCq
qqq8IO7WfDhQYAUGdrdN6z8hDzwjfse1RKPs+c05d87MmfObmTO+fHnE+E+3YRiR5c4AIs7iS6z2
hBB9LsRsHmKP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WtV7i8rtPCHYB2SrinofULl/+WxGEeAwgAjFHhngFMmiEu+xkznDciQ2aI
B8QtM8TWLpgNXKedJgqzaaI1wYe+x0SB7jPxnJo1Ubj3Er8wItXEmxjmMPEmhm4kHkBS4gEYTSUe
YBfk+y/BMt1/Ce1K/7No7/ZfwkZ4qjbRPlLrkKHagqWmtjBOoLbQc01twjKQqGADZcUyzp7Rc/K/
E3+Ju3iQWODtN3HDcHDcDDxJirD9Cr938Ps5fg/xexW/sQhmMP6Pl18uv7D4tbKf+sb3Us+Vv11O
zS0+v+y/+M3vLH5rLHXZf34CfXp6jP8aHcfdj/9FxHGbp4h8ph09afNPnLTxd7phnrT5X9dn+nw+
0mHgRWW82m0YZz5jT560PfzOnvT5JfrISOzY/lu0+0/af0R7MPJpbCjyxvCJL8IxvhyJGoPAv3V/
Ovf/AFBLAQIUABQAAAAIADpxOjIjMNLRNwsAALoQAAAHABoAAAAAAAAAIAAAAAAAAABib2wudGlm
TlUWAE5VQ1gHAAAAYgBvAGwALgB0AGkAZgBQSwUGAAAAAAEAAQBPAAAAmAsAAAAA

------=_NextPart_000_0151_01C503B0.94E8CF60
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff

------=_NextPart_000_0151_01C503B0.94E8CF60--

