Received: by whizzer.wpd.sgi.com (921026.SGI.NOSTRIP/911001.SGI)
	 id AA15606; Mon, 21 Jun 93 22:04:42 GMT
Received: from sgi.sgi.com by whizzer.wpd.sgi.com via SMTP (921026.SGI.NOSTRIP/911001.SGI)
	for /usr/people/sam/majordomo/wrapper resend -l tiff -h sgi.sgi.com -f tiff-owner -s -m "-oi -odq -om" tiff-list id AA15594; Mon, 21 Jun 93 15:04:31 -0700
Received: from relay.sgi.com by sgi.sgi.com via SMTP (920330.SGI/910110.SGI)
	for tiff-relay@whizzer.wpd.sgi.com id AA03982; Mon, 21 Jun 93 15:04:28 -0700
Received: from giraffe.asd.sgi.com by relay.sgi.com via SMTP (920330.SGI/920502.SGI)
	for tiff@sgi.sgi.com id AA25148; Mon, 21 Jun 93 15:04:25 -0700
Received: from flake.asd.sgi.com by giraffe.asd.sgi.com via SMTP (920330.SGI/920502.SGI)
	for @relay.sgi.com:cjfisher@apollo1.cacd.cr.rockwell.com id AA20946; Mon, 21 Jun 93 15:04:18 -0700
Received: from localhost.asd.sgi.com by flake.asd.sgi.com via SMTP (920330.SGI/911001.SGI)
	for @giraffe.asd.sgi.com:tiff@sgi.sgi.com id AA12640; Mon, 21 Jun 93 15:04:16 -0700
Message-Id: <9306212204.AA12640@flake.asd.sgi.com>
To: cjfisher@apollo1.cacd.cr.rockwell.com
Cc: tiff@sgi.sgi.com
Subject: Re: fax2tiff 
In-Reply-To: Your message of Tue, 15 Jun 93 17:06:14 -0500.
             <9306152205.AA22976@sgi.sgi.com> 
Date: Mon, 21 Jun 93 15:04:16 PDT
From: sam@flake.asd.sgi.com
Sender: tiff-owner@sgi.sgi.com

    To:      tiff@sgi.sgi.com
    Subject: fax2tiff
    From:    cjfisher@apollo1.cacd.cr.rockwell.com
    Date:    Tue, 15 Jun 93 17:06:14 CDT

    
    I have a question about reading FAX files with the TIFF library.

    I'm trying to read a Group 4 FAX file, and fax2tiff keeps dumping core.

Not surprising, it only reads Group 3 encoded data.

    I'm sure the FAX file is valid, as when I append TIFF header information,
    a TIFFOpen works with the file flawlessly. If the FAX file were bad, the
    program should report bad rows, not dump core, correct?

The program shouldn't dump core, but in general raw G4-encoded
data has no information that permits one to recognize it's garbage.


    fax2tiff seems to function by "hot wiring" the TIFF library, but the code
    leaves some questions:

    1. 	At what point do (*tifin->tif_predecode) and (*tifin->tif_decoderow)
    recieve the addresses of functions? Is it when
    "TIFFSetField(&faxTIFF, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX3);"
    is executed?

Huh?  What does "recieve the addresses of functions" mean?

    2.	If I want to read Group 4 rather than Group 3, do I merely change the
    above TIFFSetField?

Possibly; did you try it?

    The FAX information is originating in a CALS image that I cut apart. I am
    trying to write a generalized CALS reader for John Bradley's XV, and it seems
    silly to implement additional Group 4 machinery when libtiff is already in use.
    I will most probably attempt to replace the FAX G3 code Bradley is distributing
    in xv-3.00 (that came from PBM) with a simpler/smaller call to libtiff
    (if I can figure out fax2tiff).

That is a worthwhile thing to do and should be possible; though
perhaps a bit painful.

	Sam






