2007.07.23 09:18 "Re: [Tiff] write tiff file >2gb", by Marius_Müller
I would like to write tiff files >2Gb till 4Gb. All images which are lower then 2Gb works fine. I saw in the bugzilla:
tsize_t type defined in the tiffio.h as int32 because some functions return -1.
But this breaks possibility to write or read chuncks of data larger than 2GB.
One of the possible solutions is replace int32 with uint32 and use maximum integer value (0xffffffff) as an error indicator.
But how I read in the mailinglist archive, I suppose some people are able to write files between 2Gb and 4Gb. Or not?
Is there any solution how I can write tiff files >2Gb?
That bug means that you can't read or write chunks of data larger than 2G, but you can work with smaller pieces, just like in your code sample. Actually you can ever work with 2+ GiB chunks if you will read strip/tile size array yourself (but it is a trick and it is not required in practice).
In libtiff 4.0 tsize_t bacome 64-bit type, but it is still signed for backward compatibility, so I will close this bug report without resolution. I do not think that someone has a real need to read/write so large chunks of data, backward compatibility is really more important feature to have.
I tried with 3.9.0beta to write a 3Gb tiff file. I could write it, but I can't open this file with anykind of program. Gimp says: Not a TIFF or MDI file, bad magic number 19(0x13). Also with AsTiffTagViewer I can't open it. You wrote that I can work with smaller pieces just like in my code sample. But if I do this already what else is wrong in my code?
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger