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
May 2005

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

2005.05.12 22:27 "Array of open TIFFs limited to 2045?", by S Smith
2005.05.12 22:33 "Re: Array of open TIFFs limited to 2045?", by Jason Frank
2005.05.12 22:42 "Re: Array of open TIFFs limited to 2045?", by Chris Cox
2005.05.12 23:14 "Re: Array of open TIFFs limited to 2045?", by Frank Warmerdam
2005.05.13 00:32 "Re: Array of open TIFFs limited to 2045?", by S Smith

2005.05.12 22:27 "Array of open TIFFs limited to 2045?", by S Smith

I 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);
}