[Gdal-dev] gdal_translsate color problem

Frank Warmerdam warmerdam at pobox.com
Wed Aug 1 18:24:03 EDT 2007


Suray Ph wrote:
> Hello,
> 
> I have several color ortho-photo's of 4000x4000px, i would like to create tiles
> of 400x400px. In order to do that, I tried gdal_translate, but I have problems
> with the output file: the image is in gray scale, pixels are streched to the
> left with a big black band to the right.
...
> What is going wrong?
> Why the output file is in gray?
> 
> Could someone help me?

Suray,

What application are you viewing the output file with?  I would suggest
adding the "-co INTERLEAVE=PIXEL" option on the commandline for gdal_translate
to create a more vanilla geotiff file as output.

eg.
gdal_translate -of GTiff -co INTERLEAVE=PIXEL
     -projwin 228000 22200 228200 22000
     B228022_P72_Y2005_S71.tif .\tiles200\228000-22200-228200-22000.tif

Let me know if this resolves your issue.

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