[gdal-dev] About palette/color table expansion

Gennady Khokhorin gok at aerometric-ak.com
Wed Aug 6 21:35:32 EDT 2008


Even,
Want to try -expand option. Where 1.6.0dev trunk is living? 
On gdal.org ftp download page latest is 1.5.2
Thanks

-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Wednesday, August 06, 2008 1:50 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] About palette/color table expansion

Folks,

just a few words to advertize the new capability of color table
expansion that has been added recently to GDAL trunk (1.6.0dev).

A new option of gdal_translate, -expand rgb|rgba, enables the user to
ask for the expansion of a single band dataset with a color table and
its translation to a 3 or 4 band dataset with the R,G,B,A components.
Usefull for output drivers such as JPEG, JPEG2000, MrSID, ECW that don't
support color indexed datasets.

That capability relies on an extension of the VRTComplexSource that adds
an extra optionnal attribute
<ColorTableComponent>num_of_the_component</ColorTableComponent>.

You can use color table expansion to warp color indexed datasets with
resampling methods more sophisticated than simple nearest neighbour,
without an intermediate file that would have been produced by pct2rgb
for example.

For example :
gdal_translate -of VRT -expand rgb color_indexed.tif color_expanded.vrt
gdalwarp -t_srs EPSG:32631 color_expanded.vrt color_expanded_warped.tif

Regards.
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list