[gdal-dev] GDAL 1.7 Pb with GeoTiff Driver since revision 17563

Régis Visière regis.visiere at meteo.fr
Thu Dec 3 04:58:30 EST 2009


Hi all,

I have a problem with Jpeg compressed Tiff images ang GDAL 1.7 since 
revision 17563
The Geotiff driver can no longer read some of these images.

These images have all the same characteristics :
 - GeoTiff Image
 - Jpeg Compression
 - RGB  BitsPerSample 8
 - Photometric=YCbCr
 - Not Tiled
 - Width > 2000 and Height > 2000
 - Image OK in any standard Viewer
 - No problem with GDAL 1.6.2

A simple command like :
     gdal_translate imgpb17.tif img.png -of PNG does not work.
( Windows XP 32b and Linux 64b )

--> There's a lot of warnings :
....
Warning 1: imgpb17.tif:fractional scanline not read

...10...20.Warning 1: imgpb17.tif:fractional scanline not read
Warning 1: imgpb17.tif:fractional scanline not read
...
Warning 1: imgpb17.tif:fractional scanline not read
More than 1000 errors or warnings have been reported. No more will be 
reported f
rom now.
..30...40...50...60...70...80...90...100 - done.

and the output image is "black"

As a workaround, I modified the following line in frmts/gtiff/geotiff.cpp

line 4840
 if( !TIFFIsTiled(hTIFF)
        && nBitsPerSample == 8
        && nBlockYSize == nYSize
        && nYSize > 2000
        && !bTreatAsRGBA )
{
   /* bTreatAsSplit = TRUE; */   <--------- 
 }

But it's only a workaround, not a solution

Here is a test image : http://www.meteo.fr/special/gdal/imgpb17.tif

Could you confirm that this is really a bug and not a mistake on my part.

Best regards

Régis Visière




More information about the gdal-dev mailing list