Tacot,<br><br>You could have used a small shell script like this for converting all the tif files.<br>for f in *.tif; do echo &quot;$f -&gt; new_$f&quot;; gdal_translate -of GTiff -expand RGB -co compress=lzw $f new_$f; done<br>
<br>The issue is reported as a warning in the trunk version of GDAL. It will appear in gdal-1.8.0<br><br>Your images had only one band of 8-bit pixels.  The colors are interpreted using a color table.  You can see it in the output of gdalinfo.  By using the -expand RGB option in gdal_translate, you are creating a new tiff with three bands, one each for Red, Green and Blue colors.  This way, all the image files will have the same values for any color.  Note that your color table also had the alpha channel, but I ignored it since all of them were 255.<br>
<br>Refer to <a href="http://www.gdal.org/gdal_utilities.html">http://www.gdal.org/gdal_utilities.html</a> for documentation on various gdal utilities.<br><br><div class="gmail_quote">On Wed, Aug 11, 2010 at 1:59 PM, Tacot <span dir="ltr">&lt;<a href="mailto:cfab13@hotmail.fr">cfab13@hotmail.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





Hi<br><br>First of all, Thanks a lot: it works!<br><br>I&#39;ve run those commands line:<br><br>/*For all pictures =&gt; it&#39;s a little bit repetitive:<br><i>gdal_translate -of GTiff -expand RGB -co compress=lzw SC25_TOPO_0850_6470_L93.tif 0850_6470.tif<br>
<br>gdalbuildvrt truc.vrt *.tif<div class="im"><br><br>gdal_translate -of GTiff truc.vrt truc.tif</div></i><br><br>But maybe you can explain somme things to me:<br>- what version of gdal, reports the issue?<br><br>- What does the option RGB do?<br>
<br>- What is PCT2RGB?<br><br>Best Regards<br>Fab<br><br><hr>Date: Tue, 10 Aug 2010 09:01:36 -0700<br>From: <a href="http://user/SendEmail.jtp?type=node&amp;node=5411388&amp;i=0" rel="nofollow" target="_blank">[hidden email]</a><br>
To: <a href="http://user/SendEmail.jtp?type=node&amp;node=5411388&amp;i=1" rel="nofollow" target="_blank">[hidden email]</a><br>Subject: Re: [GDAL_TRANSLATE]Problem with colorimetry<div class="im"><br><br>

Fab,<br>
<br>
I found the problem.<br>
There were some differences in color tables of your images.
gdalbuildvrt application from the latest GDAL version reports the issue
when you try to build the vrt file. You&#39;re advised to preprocess your
rasters with other tools, such as pct2rgb.py or &quot;gdal_translate -expand
RGB&quot; to operate gdalbuildvrt on RGB rasters instead.<br>
<br>
The reason the red areas were occuring in different areas is that gdalbuildvrt considers only the first file&#39;s color table.<br><br></div><div><div class="im">On Tue, Aug 3, 2010 at 8:36 PM, Tacot <span dir="ltr">&lt;<a rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>

</div><blockquote style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"><div class="im"><br>
I think more about the value of data.<br>
<a rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/file/n5368754/PixelRed.jpg</a><br>
<br>
But it&#39;s not always the picture on the right which pixels become red; it can<br>
be also the picture on the left.<br>
I have the felling it depends on the range of merging.<br>
<font color="#888888">--<br>
View this message in context: <a rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5368754.html</a><br>

</font></div><div><div></div><div><div class="im">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
</div><a rel="nofollow" link="external">[hidden email]</a><div class="im"><br>
<a rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></div></blockquote></div><div class="im"><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>
<br></div>_______________________________________________
<br>gdal-dev mailing list
<br><a rel="nofollow" link="external">[hidden email]</a>
<br><div class="im"><a rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br><br>
</div><hr color="#cccccc" size="1">
<div style="color: rgb(102, 102, 102); font-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">

View message @ <a rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5393675.html</a>

<br>To unsubscribe from Re: [GDAL_TRANSLATE]Problem with colorimetry, <a rel="nofollow" link="external">click here</a>.
</div>
<br>                                               

<br><hr align="left" width="300">
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5411388.html" target="_blank">RE: [GDAL_TRANSLATE]Problem with colorimetry</a><div><div></div>
<div class="h5"><br>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-Dev-f2022644.html" target="_blank">GDAL - Dev mailing list archive</a> at Nabble.com.<br>
</div></div><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>