[Gdal-dev] Problem with Gtiff creation on Solaris
Frédéric Trastour
support at geoimage.fr
Wed Sep 7 06:55:31 EDT 2005
Hello,
I can't generate valid Tiff Files with gdal_translate (GDAL 1.3.0 configured
with the internal TIFF and GeoTIFF libraries).
I have seen similar messages on the list, but no solution...
A file is generated but not recognised by any application.
If I examine the output file and compare it to the valid output of a working
1.1.9 gdal release, it seems
that the file doesn't have a valid "magic number" (first bytes of the files).
I have traced an execution into ddd and I think that :
- A correct header in written first to the file - in TIFFOpenClient,
- Then image data are written to the beginning of the file ( overwritting
the good header ).
In my example (1x1 pixel gray image) this happens in TIFFAppendToStrip
called by TIFFFlush
in GTiffCreateCopy.
I don't know why, but the call to TIFFSeekFile(...SEEK_END) in
tif_write:677 retuns 0 instead
of the amount of data already written the file, so the image data are
written at pos 0 and overwrite
the header.
I can't understand why the SeekFile returns 0 as it occurs after a write
operation. I have not seen any
other operations which may change the current position ( but I am probably
missing something...).
Does this configuration 1.3.0 with internal libraries works on other systems (
linux, windows ) ?
In a first time I suspected something related to byte ordering or large file
support.
Any ideas or comments appreciated.
Frédéric.
Sorry for my english probably full of syntax errors...
_________________________________________________________________
Frédéric Trastour - SpacEyes - dev at spaceyes.fr
More information about the Gdal-dev
mailing list