Received: from inav038.isp.belgacom.be (localhost.localdomain [127.0.0.1])
	by inav038.isp.belgacom.be (Postfix) with ESMTP id C9494B6F64
	for <joris.at.lebbeke@skynet.be>; Tue,  6 Feb 2007 12:10:26 +0100 (CET)
Received: from inas033.isp.belgacom.be (inas033.isp.belgacom.be [195.238.6.212])
	by inav038.isp.belgacom.be (Postfix) with ESMTP id BAC35B6F62
	for <joris.at.lebbeke@skynet.be>; Tue,  6 Feb 2007 12:10:26 +0100 (CET)
Received: from inmx011.isp.belgacom.be (inmx011.isp.belgacom.be [195.238.5.50])
        by inas033.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id l16BAPYS014098
        for <joris.at.lebbeke@skynet.be>; Tue, 6 Feb 2007 12:10:26 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx011.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l16BAFVO021662
        for <joris.at.lebbeke@skynet.be>; Tue, 6 Feb 2007 12:10:15 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l16AsWDs010145;
	Tue, 6 Feb 2007 05:55:21 -0500
Received: from seabass.pepperfish.net (pike.pepperfish.net [62.197.40.8])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l16AsLMd010141
	for <tiff@lists.maptools.org>; Tue, 6 Feb 2007 05:54:22 -0500
Received: from nobody by seabass.pepperfish.net with local (Exim 4.50 #1
	(Debian)) id 1HENxn-000632-KN
	for <tiff@lists.maptools.org>; Tue, 06 Feb 2007 10:54:15 +0000
Received: from 81.101.136.177 ([81.101.136.177]) 
	by secure.pepperfish.net (IMP) with HTTP 
	for <john@pepperfish.org@localhost>; Tue,  6 Feb 2007 10:54:15 +0000
Message-ID: <1170759255.45c85e5782e24@secure.pepperfish.net>
Date: Tue,  6 Feb 2007 10:54:15 +0000
From: John Whitington <john@pepperfish.net>
To: tiff@lists.maptools.org
Subject: Re: [Tiff] The fake input in fax2tiff
References: <1170704084.45c786d46eecb@secure.pepperfish.net>
	<000801c749ac$35bcd9c0$777dfea9@AWareCore2Duo>
In-Reply-To: <000801c749ac$35bcd9c0$777dfea9@AWareCore2Duo>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
User-Agent: Internet Messaging Program (IMP) 3.2.1
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
Content-Transfer-Encoding: quoted-printable
X-UIDL: 000000000023ceae.000020af
X-MSP-STORE: Tue, 06 Feb 2007 12:10:27 +0100
Status:   

Joris,

Quoting Joris <joris.at.lebbeke@skynet.be>:

> John Whitington wrote:
> > I'm modifying the fax2tiff source to decode CCITT streams from PDF
> > files into raw data. Thus, I don't need to produce an output TIFF. It
> > works, but now I'm paring it down by removing the output code.
> >
> > The fake input fax2tiff produces to make the fax input work is
> > initialised in the original source like this:
> >
> > faxTIFF =3D TIFFClientOpen("(FakeInput)", "w",
> > /* TIFFClientOpen() fails if we don't set existing value here */
> > TIFFClientdata(out),
> > TIFFGetReadProc(out), TIFFGetWriteProc(out),
> > TIFFGetSeekProc(out), TIFFGetCloseProc(out),
> > TIFFGetSizeProc(out), TIFFGetMapFileProc(out),
> > TIFFGetUnmapFileProc(out));
> >
> > (Where 'out' is the TIFF pointer being used for output).
> >
> > How can I synthesize the values (TIFFClientdata etc.) without having
> > to open an actual output TIFF?
>=20
> Perhaps I'm misunderstanding, but it seems to me there is a much easier=
=20
> approach. Work out a fake file header and fake IFD that for convinience=
 you=20
> place right after the file header. Make the fake IFD have all appropria=
te=20
> settings for this kind of file, like appropriate Photometric and Compre=
ssion

[snip details]
=20
> Or am I missing something?

fax2tiff works below the normal API level for libtiff, as far as I can se=
e=20
(which is why it directly references tiffiop.h and tif_config.h). The par=
amaters=20
being generated in the original fax2tiff code I quote above are completel=
y=20
wrong, they're just non-NULL, to avoid the call to TiffClientOpen failing=
, The=20
parameters themselves will never be called.

So I suppose I can rephrase: What's the easiest way to make non-NULL para=
meters=20
of suitable types?

As you can guess, I'm not a C programmer! (I'm interfacing this code to a=
nother=20
language)
=20

--=20
John Whitington
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
