Thanks for your quick response, Uwe. Yes, all the tif files have got the same color table. I checked that and added the -pct option. But I think I forgot to remove the old merged one I generated without the -pct option. Now that I have removed the old merged one, a merged colored tif file is successfully generated after running the same command :)
<br>________________________________
<br>From: Schmitz, Uwe [via OSGeo.org] [<a href="/user/SendEmail.jtp?type=node&node=5955057&i=0" target="_top" rel="nofollow">[hidden email]</a>]
<br>Sent: 24 January 2011 09:24
<br>To: Heng Feng
<br>Subject: AW: [gdal-dev] An issue about using GDALWARP todotheNTv2transformation
<br><br>Heng,
<br><div class='shrinkable-quote'><br>&gt;
<br>&gt; Hi Uwe,
<br>&gt;
<br>&gt; I have been trying to use gdal_merge.py to merge
<br>&gt; a few 8 bit colored .tif tiles together. Having
<br>&gt; tried all sorts of options for this command, I
<br>&gt; always ended up with a merged 8-bit grayscale picture.
<br>&gt; I did a search on the internet and found a couple of
<br>&gt; posts related to this, however it seemed to me that
<br>&gt; the gdal_merge.py just does not have the ability
<br>&gt; to preserve the color. Did I get the wrong idea about
<br>&gt; this? Do you have any suggestion to solve this problem?
<br>&gt;
</div>you have to specify &quot;-pct&quot; to grab the color table
<br>of the first merged tile for the result file.
<br>And, very important, all input tiles need to have
<br>the *same* color table, because merging is done
<br>on pixel values (that means channels).
<br><br>&gt; Not sure if I should post a separate message for
<br>&gt; this gdal_merge.py issue. &nbsp;I just thought this would
<br>&gt; be the quickest way to get the help :)
<br>&gt;
<br>Yes, IMO a seperate post would have been better and
<br>addressing it to me wouldn't always help to get a fast
<br>response ;-)
<br><br>Regards
<br>Uwe
<br>_______________________________________________
<br>gdal-dev mailing list
<br>[hidden email]&lt;UrlBlockedError.aspx&gt;
<br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br><br><br>________________________________
<br>If you reply to this email, your message will be added to the discussion below:
<br><a href="http://osgeo-org.1803224.n2.nabble.com/An-issue-about-using-GDALWARP-to-do-the-NTv2-transformation-tp5838904p5954610.html?by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/An-issue-about-using-GDALWARP-to-do-the-NTv2-transformation-tp5838904p5954610.html</a><br>To unsubscribe from An issue about using GDALWARP to do the NTv2 transformation, click here&lt;<a href="http://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5838904&code=aGVuZy5mZW5nQGFpcmNvbWludGVybmF0aW9uYWwuY29tfDU4Mzg5MDR8MTI3MzEwMjEw&by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5838904&code=aGVuZy5mZW5nQGFpcmNvbWludGVybmF0aW9uYWwuY29tfDU4Mzg5MDR8MTI3MzEwMjEw</a>&gt;.
<br><br>AIRCOM International
<br>Mobile World Congress 2011, 14-17 February
<br>Stand 1B14, Barcelona, Spain
<br>Click mailto:<a href="/user/SendEmail.jtp?type=node&node=5955057&i=1" target="_top" rel="nofollow">[hidden email]</a>?subject=Mobile%20World%20Congress%20'11%20meeting%20-%20Appointement%20Booking to book a meeting
<br><br>Disclaimer: 
<br>This e-mail message is confidential and should not be used by, or disclosed to, anyone except the addressee. If you receive this message in error, please advise us immediately on +44 (0) 1932 442000. Since e-mail transmission is not secure or error free, we do not accept responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your systems. You should therefore virus-check all attachments before opening. AIRCOM may monitor incoming and outgoing emails through its networks and by responding to this email, you consent to such monitoring. The views and opinions expressed in this e-mail are those of the author only and not of AIRCOM. We do not intend to enter into any legal commitments or contracts by e-mail. Registered Office: Cassini Court, Randalls Research Park, Randalls Way, Leatherhead, Surrey, KT22 7TW, UK. AIRCOM International Ltd registered in England No. 3052022. VAT number 811 5323 68.
<br>Save a tree. Don't print this e-mail unless it's really necessary
<br>
<br><hr align="left" width="300">
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/An-issue-about-using-GDALWARP-to-do-the-NTv2-transformation-tp5838904p5955057.html">RE: [gdal-dev] An issue about using GDALWARP todotheNTv2transformation</a><br>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-Dev-f2022644.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br>