[Gdal-dev] Can't Read CCITTFAX 4 TIFs

Tom Kazimiers 2voodoo at gmx.de
Fri Nov 2 13:17:53 EDT 2007


Hi there,

I am using GDAL 1.4.3 and esp. GeoTiff for reading and displaying
GeoTiffs on Windows CE.
I successfully managed it to display GeoTiff Files that are LZW
compressed - other formats seem not to work.
The error message I get when trying to load CCITTFax (3 or 4 - both do
not work) compressed images is:

GetBlockRef failed at X block offset 0, Y block offset 0

RasterIO still returns 0 (so it seems as there occured no error - but
CPLGetLastErrorMsg() returns the message above.)
gdalinfo returns for the working image:

Driver: GTiff/GeoTIFF
Size is 62, 68
Coordinate System is `'
Metadata:
  TIFFTAG_SOFTWARE=IrfanView
  TIFFTAG_XRESOLUTION=508
  TIFFTAG_YRESOLUTION=508
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   68.0)
Upper Right (   62.0,    0.0)
Lower Right (   62.0,   68.0)
Center      (   31.0,   34.0)
Band 1 Block=62x68 Type=Byte, ColorInterp=Palette
  Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 128,255,0,255
    1: 251,13,0,255

For the same image (just compressed with CCITTFax4 - and black/white
colors) it returns:
Driver: GTiff/GeoTIFF
Size is 62, 68
Coordinate System is `'
Metadata:
  TIFFTAG_SOFTWARE=IrfanView
  TIFFTAG_XRESOLUTION=508
  TIFFTAG_YRESOLUTION=508
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=CCITTFAX4
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   68.0)
Upper Right (   62.0,    0.0)
Lower Right (   62.0,   68.0)
Center      (   31.0,   34.0)
Band 1 Block=62x68 Type=Byte, ColorInterp=Palette
  Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255


Everything is identical, but the the compression tag.
Do you have any hint what might have gone wrong?

Thanks in advance,
Tom




More information about the gdal-dev mailing list