[gdal-dev] gdal_translate produces tif with different colors as original

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Nov 6 12:32:42 PST 2013


 <Moses.Gone <at> t-systems.com> writes:

> 
> 
> 
> Hello List,
> I am using SDE as my raster data source with the ultimate goal  to tile
this dataset: I am running the following  gdal_translate command to generate
the initial VRT:  
>  
> gdal_translate  -projwin 390605 5588320 410128 5568805 -a_srs EPSG:25832
-a_nodata none -of vrt SDE:server,5153,db,user,pw,table,image clippedvrt.vrt
>  
> Tiling the resultant VRT produces tiff with weird colors. The colors are
either intensified or totally different from the original as you can see
from the attached test results
>  
> 
> https://drive.google.com/file/d/0Bw-iJv3cImO7bkZYRVZERi1rTTg/edit?usp=sharing 
>  
> could someone shade some light as to what might be happening.

Hi,

I have seen something similar when I have created a VRT file from one
paletted image but the following images have used different palettes which
were optimized for each image. Now the palette of the  first image was
written into the VRT file and when it was applied to the other images the
result looked pretty funny. In my case I used the gdalbuildvrt tool which
gave me a helpful warning and a useful hint:
" The end result might produce weird colors. 
You're advised to preprocess your rasters with other
tools, such as pct2rgb.py or gdal_translate -expand RGB to operate
gdalbuildvrt on RGB rasters instead."

Perhaps you have somehow similar situation.

-Jukka Rahkonen-






More information about the gdal-dev mailing list