[gdal-dev] getcolortable is null
weixj2003ld
weixj2003ld at 163.com
Wed Apr 7 10:43:06 EDT 2010
Thk u very much.
I have two questions.
1.If I want to use the following combination,
Red=Band3
Green=Band2*0.8+band4*0.2;
Blue=band1
2. what is the general combination for good look jpeg file?
>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, warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush | Geospatial Programmer for Rent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100407/1f26b359/attachment.html
More information about the gdal-dev
mailing list