TIFF and LibTiff Mail List Archive


2002.01.02 18:00 "TIFF file with 2k header", by Eric Hamrick
2002.01.03 14:24 "RE: TIFF file with 2k header", by Kari Poysa
2002.01.03 14:55 "RE: TIFF file with 2k header", by Kjetil Haga

2002.01.03 14:24 "RE: TIFF file with 2k header", by Kari Poysa


I would try modifying the operating system specific file that contains the file open, close and especially seek functions. In my case this is the "tif_unix.c" file. What you can do is (1) seek past the 2k header right after opening the file, and (2) add the 2k for each offset passed to the seek function. This way, the rest of the library is fooled into thinking that there is no header. Remember to subtract the 2k from the value that the seek function returns.

I have not implemented this, but it looks simple enough. I have not tinkered with reading TIFF files using the library, but I have made some changes into the library code for writing new TIFF files. The library uses these platform dependent functions for portability reasons, and that should be a nice place for your changes. The resulting modified library of course is pretty application dependent. If you try this, please let me know how it went.

--- Kari Poysa ---