| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2005.05.12 22:27 "Array of open TIFFs limited to 2045?", by S SmithI have a continuous acquisition loop going and I want
to save time by opening all the TIFF files beforehand
and then closing them all at the end of the epoch.
But there seems to be a limit of 2045 files (variable
'numfiles' below). Libtiff crashes if I exceed that
number of files. Why? Is there a way around it?
TIFF** tifarray;
tifarray = (TIFF**)malloc(sizeof(TIFF*)*numfiles);
for (int prei=0;prei<m_NumFiles;prei++) {
filename_suffix.Format("%06d.tif",prei);
output_filename = m_FilenameBase + filename_suffix;
tif = TIFFOpen(output_filename, "w");
TIFFSetField(tif, TIFFTAG_PLANARCONFIG,
PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 512);
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 512);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT,
SAMPLEFORMAT_UINT);
tifarray[prei]=tif;
str.Format("Now prewriting file: %i / %i", prei,
m_NumFiles);
pDataWritten->SetWindowText(str);
}
|
|||||||