TIFF TileByteCounts problem
|Reported by:||dengo||Owned by:||warmerdam|
Description (last modified by )
we’ve encountered a strange problem with a big 32bit float TIFF. The TIFF is created with GDAL. Later the pyramids and statistics on this file are calculated with ERDAS Imagine 2015. Now when we try to read the file with GDAL again, there is a problem (GetBlockRef failed) I’ve tried to debug the problem and it seems the problem is related to the TIFF Tag TileByteCounts. After the file was adjusted by ERDAS the bytecount per tile is read as 1067030938 instead of 65536 (128x128 block size). Another thing I’ve notices that the tdir_type of the TileByteCounts Tag which was 16 before now is 4. I’ve tried to debug further but I did not really understand where those strange td_stripbytecount are coming from.
I’m not sure if it is more of a ERDAS bug than a problem with GDAL, nevertheless ERDAS and ESRI ArcMap don’t seem to have a problem with the file after ERDAS adjusted it. I’ve created two zips, working.zip with the raster before, and notworking.zip with the raster after ERDAS modified the file. The test file has the same value for all pixels so the zip files are quite small.
The problem occurs with GDAL 1.11.2 and GDAL 2.0 (not the very latest version tested).
Best regards, Dennis