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
September 2007

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

2007.09.20 21:03 "libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Frank Warmerdam
2007.09.20 22:20 "Re: libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Andrey Kiselev
2007.09.21 17:46 "Re: libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Joris Van Damme
2007.10.04 15:05 "Re: libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Frank Warmerdam
2007.10.05 05:45 "Re: libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Joris Van Damme

2007.10.04 15:05 "Re: libtiff4, and the size of STRIPOFFSETs and TILEOFFSETs", by Frank Warmerdam

Frank Warmerdam wrote:
> Joris, and others,
> 
> I discovered a problem today with GDAL's use of libtiff4.  The problem
> occurs because libtiff decides as it is writing directories whether to
> write fields like TILEOFFSETs as LONG (4byte) or LONG8 (8byte).  However,
> my code depends on the questionable assumption that I can rewrite a
> directory after altering (only) the tile/strip offset and size values.

Folks,

I have decided that my current approach of rewriting the whole directory
is too risk-prone (ie. still doesn't work with legitimate pre-existing
files) so I'm going to change my code to include custom mechanisms to
update the strip/tile offset/size tags "in place" without using the
libtiff "write directory" mechanism.  Once done, I'll back out the changes
I mentioned above.

I'm considering implementing this as a sort of auxilary libtiff function.
Something like "TIFFRewriteImageOffsetSize()" that would update the
current directory on disk with the "in memory" strip/tile offsets and sizes.
This might result in moving the lists to the end of the file if they change
in size (ie. shorts become longs, etc).  Do others feel this would be a useful
function to have available in libtiff?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org