[gdal-dev] Does CCITTFax-Compression of GeoTiffs work for you?
Tom Kazimiers
2voodoo at gmx.de
Sun Jan 13 12:25:03 EST 2008
Ivan,
thanks for your answer. I do not think that IrfanView writes out of
standard CCITT - bu anyway I tryed with gdal_translate.
Maybe I interpret this information wrong, but "gdal_translate --format
GTiff" gives the following output:
Format Details:
Short Name: GTiff
Long Name: GeoTIFF
Extension: tif
Mime Type: image/tiff
Help Topic: frmt_gtiff.html
Supports: Create() - Create writeable dataset.
Supports: CreateCopy() - Create dataset by copying another.
Creation Datatypes: Byte UInt16 Int16 UInt32 Int32 Float32 Float64
CInt16 CInt32 CFloa
<CreationOptionList>
<Option name="COMPRESS" type="string-select">
<Value>NONE</Value>
<Value>LZW</Value>
<Value>PACKBITS</Value>
<Value>JPEG</Value>
<Value>DEFLATE</Value>
</Option>
<Option name="PREDICTOR" type="int" description="Predictor Type"/>
<Option name="JPEG_QUALITY" type="int" description="JPEG quality
1-100, default 75."/>
<Option name="INTERLEAVE" type="string-select">
<Value>BAND</Value>
<Value>PIXEL</Value>
</Option>
<Option name="TILED" type="boolean" description="Switch to tiled format"/>
<Option name="TFW" type="boolean" description="Write out world file"/>
<Option name="BLOCKXSIZE" type="int" description="Tile Width"/>
<Option name="BLOCKYSIZE" type="int" description="Tile/Strip Height"/>
<Option name="PHOTOMETRIC" type="string-select">
<Value>MINISBLACK</Value>
<Value>MINISWHITE</Value>
<Value>RGB</Value>
<Value>CMYK</Value>
<Value>YCBCR</Value>
<Value>CIELAB</Value>
<Value>ICCLAB</Value>
<Value>ITULAB</Value>
</Option>
<Option name="PROFILE" type="string-select">
<Value>GDALGeoTIFF</Value>
<Value>GeoTIFF</Value>
<Value>BASELINE</Value>
</Option>
</CreationOptionList>
Does this mean CCITT compression is not supported at all?
Thanks,
Tom
ivan.lucena at pmldnet.com schrieb:
> Hi Tom,
>
> As long as I know GeoTiff CCITT 4 should work well in GDAL.
>
>
>> TIFFTAG_SOFTWARE=IrfanView
>>
>
> Is it possible that "IrfanView" is producing a corrupted or out of standard CCITT?
>
> Have you try to check the integrity of that files in another software?
>
> And what if you gdal_translate the successful LZW file to CCITT 4? Does it works?
>
> Just some ideas...
>
> Ivan
>
>
>> -------Original Message-------
>> From: Tom Kazimiers <2voodoo at gmx.de>
>> Subject: [gdal-dev] Does CCITTFax-Compression of GeoTiffs work for you?
>> Sent: Jan 13 '08 13:52
>>
>> Hi there,
>>
>> I asked this question already two month ago and would like to give it another try.
>> 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
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>
>
More information about the gdal-dev
mailing list