2010.05.10 09:35 "[Tiff] Increasing the number of files loadable through libtiff", by Simon R. Proud

2010.05.10 15:30 "Re: [Tiff] Increasing the number of files loadable through libtiff", by Simon R. Proud

Edward and Olivier, thanks for your replies. I used the info you gave me and have fixed it now.

>>If it's the same as that last thread then your problem is probably not reading the files

The problem occured at the call to TIFFOpen, not when actually reading/writing to files.

>>- Examine the underlying cause of your error. Are you exceeding the maximum number of file handles allowed?

This was the first cause of the error. I had a limit of 1024 and was trying to open ~5000!

With that fixed the error persisted, though. But:

>>- TIFFOpen() flags: Use "m" to disable memory mapping, and probably "C" to enable strip chopping. See http://www.remotesensing.org/libtiff/man/TIFFOpen.3tiff.html

This fixed it. I now run with the "rmC" flags and it is successfull, even when loading a combined TIFF image set of larger size than the system memory.

Out of interest: Is there any reason why memory mapping is enabled by default? Enabling it causes problems like the ones I have been having and, at least in my case, offers no speed advantage.

Thanks again for the help. The problem can be regarded as solved.

Hi all, some time ago I posted a thread about not being able to load large numbers of TIFFs using TiffOpen ( http://www.asmail.be/msg0054686850.html ), for some reason I can't reply to that now. Anyway, I have now hit a similar problem again. I need to open a large number of TIFFs at once (totalling ~18Gb), but only have 16Gb of memory.

Is there any way to overcome this and be able to open all files simultaneously? I've tried fiddling with the numerous TIFFOpen options ("rM", "rCm", "rcm" etc) but have had no luck.

I only need to read one scanline at a time (which for all files would total about 20Mb!), so don't see that memory for the entire file is required.

Any ideas, assistance, etc? Apologies if this is a very basic query, I'm something of a novice programmer.