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
January 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.01.04 17:51 "Access to bare libtiff codecs?", by John Aldridge
2007.01.04 18:02 "Re: Access to bare libtiff codecs?", by Lee Howard
2007.01.04 18:56 "Re: Access to bare libtiff codecs?", by Edward Lam
2007.01.04 18:44 "Re: Access to bare libtiff codecs?", by Joris Van Damme
2007.01.05 15:42 "Re: Access to bare libtiff codecs?", by Andy Cave
2007.01.05 16:06 "Re: Access to bare libtiff codecs?", by John Aldridge

2007.01.04 18:02 "Re: Access to bare libtiff codecs?", by Lee Howard

John Aldridge wrote:

> We've got a requirement to create (from an array of bits) a CCITT 
> Group 3 or 4 encoded data stream which is /not/ wrapped up in a TIFF 
> file, and I wondered whether libtiff (which we already use for other 
> reasons) could do this.
>
> We could, I think, do this by creating a temporary TIFF file of the 
> right format, calling TIFFWriteEncodedStrip to encode the data, and 
> then calling TIFFReadRawStrip to get the encoded data back, but is 
> there an easier way? 


That' is the method, essentially, that HylaFAX follows.  However HylaFAX 
has its own G3/G4 encoder and decoder which it can use to re-encode data 
on-the-fly (without using a TIFF file).  This encoder is not that 
dissimilar from the one in libtiff as they both started from the same 
author and share an identical license and much of the same code.

So - yes, you could link directly in to the libtiff or HylaFAX source 
code to achieve your requirement without writing it to TIFF.  But if you 
want to use the libtiff API I think that you'll need to use the 
approximate method you describe.  At least, I don't know of any entirely 
in-memory TIFF-encode API functions.  Of course, I'm no libtiff expert.

Lee.