[Gdal-dev] gdal_translate 1.4.0 problem

Frank Warmerdam warmerdam at pobox.com
Mon Jan 15 19:04:15 EST 2007


Gennady Khokhorin wrote:
> Hello.
> I got a problem with gdal_translate utility. Using simplest form:
> gdal_translate rgb32.tif rgb32_copyGdal.tif
> produced distorted output image so some sw can not open it. 
> The same distorted image I got from fwTools112 (File/Export option).
> Original image is 8 bits/sample, 3 samples/pixel, RGB color model, no compression.
> The tiffcp 3.8.2 works fine. 
> Platform: winXP + msvc8.0
> Test image is here: ftp://aerometric-ak:amak2014@ftp.aerometric-ak.com, go to gok/imageProcessing folder.
> Could somebody help to figure out which part of translate process is wrong?

Gennady,

By default GDAL produces planar configuration "seperate" files - essentially
band sequential organization.  But the more common organization of TIFF files
is "single plane" or which is pixel interleaved.  Some applications only
support pixel interleaved.

If you add "-co INTERLEAVE=PIXEL" in the gdal_translate command, then the
more widely accepted form of the file will be produced.

I checked your files, and they seem to confirm the above problem.  The output
file looks fine in OpenEV.

The default to INTERLEAVE=BAND in the geotiff driver is quite dubious given
the compatability problems is has raised in the past.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list