Thanks Even!

This perfectly matches a task I have, and lets me cast half a dozen scripts I've created with the pctrgb workaround into the compost bin. :)

matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------


Even Rouault wrote:
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev



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

Reply via email to