AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.02.05 19:34 "The fake input in fax2tiff", by John Whitington
2007.02.06 05:03 "Re: The fake input in fax2tiff", by Joris Van Damme
2007.02.06 10:54 "Re: The fake input in fax2tiff", by John Whitington

2007.02.06 10:54 "Re: The fake input in fax2tiff", by John Whitington

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 = 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?
> 
> Perhaps I'm misunderstanding, but it seems to me there is a much easier 
> approach. Work out a fake file header and fake IFD that for convinience you 
> place right after the file header. Make the fake IFD have all appropriate 
> settings for this kind of file, like appropriate Photometric and Compression

[snip details]
 
> Or am I missing something?

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

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

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

-- 
John Whitington