<br><font size=2 face="sans-serif">Thanks, Frank. &nbsp;I want to merge
all bands into one band image, something like Photoshop's flat layers function.
Of course, another solution is to use open source image library to do it.</font>
<br>
<br><font size=2 face="sans-serif">Best regards,</font>
<br>
<br><font size=2 face="sans-serif">Huajun Zhang</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Frank Warmerdam &lt;warmerdam@pobox.com&gt;</b>
</font>
<p><font size=1 face="sans-serif">03/06/2007 11:41 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Huajun Zhang &lt;huajun_zhang@usgs.gov&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">gdal-dev@lists.maptools.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Gdal-dev] How to flat multiple
bands image into single band image?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Huajun Zhang wrote:<br>
&gt; <br>
&gt; Hi folks,<br>
&gt; <br>
&gt; I want to flat a multiple band image with geotiff format into a single
<br>
&gt; band image, do you have any idea how to do it with GDAL or other FWTools?<br>
<br>
Huajun,<br>
<br>
What sort of merging do you want to do? &nbsp;Do you want to average all
the bands?<br>
Or perhaps you just want to extract a single band? &nbsp;You can extract
single<br>
bands with something like:<br>
<br>
 &nbsp;gdal_translate -b 1 in.tif out.tif<br>
<br>
But there is no ready mechanism to average bands into one result band.
&nbsp;The<br>
easiest way to do this would be to write a python script using numeric
to<br>
do the averaging.<br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up &nbsp; | Frank Warmerdam, warmerdam@pobox.com<br>
light and sound - activate the windows | http://pobox.com/~warmerdam<br>
and watch the world go round - Rush &nbsp; &nbsp;| President OSGeo, http://osgeo.org<br>
</tt></font>
<br>