AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.03.15 17:56 "[Tiff] Need to write CCITT T.6 encoded TIFF file data directly to memory buffer", by Roger Watkins
2005.03.15 18:09 "Re: [Tiff] Need to write CCITT T.6 encoded TIFF file data directly tomemory buffer", by Joris
2005.03.16 18:08 "Re: [Tiff] Need to write CCITT T.6 encoded TIFF file data directly tomemory buffer", by Roger Watkins

2005.03.15 17:56 "[Tiff] Need to write CCITT T.6 encoded TIFF file data directly to memory buffer", by Roger Watkins

Gentlemen;

I have a program that merges CCITT T.6 TIFFs (little B/W images used for illustrations in documents) into a single image with stripe separations. It uses libTIFF 3.7.1 and currently generates an output file. I need to put the CCITT T.6 TIFF file into an image database, so currently I must:

  1. for each document stored in a separate directory, retrieve all its TIFFs from files to be merged
  2. merge all TIFFs retrieved into a single contiguous TIFF with separator stripes
  3. store the single contiguous TIFF to a file
  4. retrieve the single contiguous TIFF from file in a file stream
  5. load the file stream into the database

In order to significantly reduce the disk chugging and speed up the process, it would help if I knew how to use libTIFF to change this process to:

  1. for each document stored in a separate directory, retrieve all its TIFFs from files to be merged
  2. merge all TIFFs retrieved into a single contiguous TIFF with separator stripes
  3. store the single contiguous TIFF to a memory buffer or memory stream (currently the BCB5 TMemoryStream is what I need if this option is chosen) (4. put the memory buffer into a memory stream)

5. load the memory stream into the database

Based upon reading the archives, I expect direct load into a TMemoryStream is a little specific to ask of libTIFF, so my hope is someone can tell me how to do an encoded save of a tiff to a memory buffer instead of a file. I have found tif_stream.cpp, but no good examples of how to use these functions that seem to hold such great promise.

Many thanks in advance.

Roger Watkins

RogerQuillDisc@insightbb.com