Opened 7 years ago

Closed 7 years ago

#6848 closed defect (invalid)

Tiff file is only partially read.

Reported by: alon Owned by: warmerdam
Priority: high Milestone: 2.2.0
Component: GDAL_Raster Version: 2.1.3
Severity: major Keywords:
Cc:

Description

Hello,

when I read the file from here:

http://dev.skylinesoft.com/alon/757.zip

the image is only partially opened, and I can see the data until line 2052.

I get those errors in both my code and gdal_translate, so I did not provide a code sample. let me know if you need one.

I do not know if this is a bug in gdal or libtiff, and I do not know how to check.

what puzzles me is the Quantum GIS ( a.k.a QGIS) can open this file properly. and I know it uses gdal. when I export the tiff from QGIS to another tiff, I can open the exported file properly.

this is the errors I get from gdal_translate: Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag ignored Warning 1: TIFFReadDirectory:Bogus "StripByteCounts" field, ignoring and calculating from imagelength Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag ignored Warning 1: TIFFReadDirectory:Bogus "StripByteCounts" field, ignoring and calculating from imagelength ...10... ERROR 1: TIFFFillStrip:Read error at scanline 2052; got 125941 bytes, expected 170880 ERROR 1: TIFFReadEncodedStrip() failed. ERROR 1: 757.tif, band 1: IReadBlock failed at X offset 0, Y offset 2053 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2053

Change History (2)

comment:1 by Jukka Rahkonen, 7 years ago

When the error message clearly states that there is an error in to tiff file, the hypothesis you should make is that the error message is correct and the file really is corrupted. Now you instead think that there must be a bug in either libtiff or in GDAL.

I tried to open that image with a Java base viewer and it was giving this error:

Caused by: java.io.IOException: Could not read block (block start: 26418, block length: 1947348480, data length: 350968999).

I am pretty sure that the image is corrupted. QGIS may be kind enough to skip the faulty block and show what it can read from the image.

Next time please don't start discussion by creating a bug report about something that may not be a bug. Start communicating by sending an email to gdal-dev list like "Hey, I try to open this image but GDAL says it is corrupted. Could someone verify that the image is really corrupted?"

comment:2 by Jukka Rahkonen, 7 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.