[gdal-dev] Creating RGB from single band greyscale images
Frank Warmerdam
warmerdam at pobox.com
Sat Feb 16 10:14:20 EST 2008
mattia wrote:
> Hello
>
> Is there a way in GDAL to create an RGB image by merging 3 different
> greyscale bands??
> I guess it would not be gdal_merge as this has to do with mosaicking...
>
> Any suggestions?
Mattia,
Actually, gdal_merge.py also support "merging by stacking" with the
-separate flag. So if you had three greyscale files that cover the
same area and you do:
gdal_merge.py -separate 1.tif 2.tif 3.tif -o rgb.tif
This map 1.tif to red, 2.tif to green and 3.tif to blue.
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 | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list