[Gdal-dev] colormap problem using gdal_translate

Frank Warmerdam warmerdam at pobox.com
Mon Aug 7 09:41:35 EDT 2006


guillaume huby wrote:
> Hello,
> 
> I'm using FWTools1.0.5.
> 
> I use gdal_translate to convert a BIP+HDR+CLR file to a tif file :
> gdal_translate toto.bip toto.tif
> 
> I have a problem with the output color map : all colors are shift by one 
> index. For exemple the color of index 2 in the bip file is associated to 
> index 3 in tif file, and so on. Index 0 is set to black (R=0, G=0, B=0) 
> and the color of index 255 in bip file is no longer in new color map.
> 
> I tried
> gdal_translate -mo "TIFFTAG_PHOTOMETRIC=3" toto.bip toto.tif
> wich helps nothing.
> 
> Did I do something wrong ?
> Is there any way to solve this ?

Guillaume,

Could you email me your .clr file?  I suspect there is a small problem in
the .clr reading code in some cases.

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 OSGF, http://osgeo.org




More information about the Gdal-dev mailing list