weixj2003ld wrote:
I read a geotiff file, and find that poBand->GetColorTable()==NULL
Wei, Presumably GetColorTable() returns NULL because the GeoTIFF file does not have a color table.
But I use ERDAS IMAGINE9.2 (a software that deal with geotiff), I find that it is not grey,but I use "gdal_translate -b 6 -of JPEG old.tif net.jpg", find that is is grey.
Well, you are selecting only one band withouta color table to export to net.jpg. How do you expect it to be anything other than greyscale? If you want an RGB jpeg file then select three bands to be used as red, green and blue. eg. gdal_translate -b 4 -b 5 -b 6 o-of JPEG old.tif net.jpg Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
