[gdal-dev] [GDAL_TRANSLATE] Gray scale

Gianni Cristian giannicristian at msn.com
Thu Jun 30 09:31:22 EDT 2011


Hi guys,
I need to convert an image from GTiff to ENVI format. I want also that my
image is in Grayscale. The GTiff image have just one band. If I do with
ENVI, I save the file as Image, ENVI 8-bit (I call this results fromENVI).
When I try to do the same with gdal_translate I do:

gdal_translate -of ENVI -ot Byte gtiffimg.tif fromgdal.raw

But the result is a lot different from the 'fromENVI' image. So I have tried
to do:


gdal_translate -of ENVI -ot Byte -b 1 -expand gray gtiffimg.tif fromgdal.raw

and


gdal_translate -of ENVI -ot Byte -expand gray gtiffimg.tif fromgdal.raw

But I get the following error:

Input file size is 1828, 1646
Error : band 1 has no color table

I wrong something or is gdal fault?

Thx

Solimyr


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Gray-scale-tp6533237p6533237.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list