Tacot, You could have used a small shell script like this for converting all the tif files. for f in *.tif; do echo "$f -> new_$f"; gdal_translate -of GTiff -expand RGB -co compress=lzw $f new_$f; done
The issue is reported as a warning in the trunk version of GDAL. It will appear in gdal-1.8.0 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. Refer to http://www.gdal.org/gdal_utilities.html for documentation on various gdal utilities. On Wed, Aug 11, 2010 at 1:59 PM, Tacot <cfa...@hotmail.fr> wrote: > Hi > > First of all, Thanks a lot: it works! > > I've run those commands line: > > /*For all pictures => it's a little bit repetitive: > *gdal_translate -of GTiff -expand RGB -co compress=lzw > SC25_TOPO_0850_6470_L93.tif 0850_6470.tif > > gdalbuildvrt truc.vrt *.tif > > > gdal_translate -of GTiff truc.vrt truc.tif > * > > But maybe you can explain somme things to me: > - what version of gdal, reports the issue? > > - What does the option RGB do? > > - What is PCT2RGB? > > Best Regards > Fab > > ------------------------------ > Date: Tue, 10 Aug 2010 09:01:36 -0700 > From: [hidden email]<http://user/SendEmail.jtp?type=node&node=5411388&i=0> > To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5411388&i=1> > Subject: Re: [GDAL_TRANSLATE]Problem with colorimetry > > > Fab, > > I found the problem. > 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're advised to preprocess your rasters with other > tools, such as pct2rgb.py or "gdal_translate -expand RGB" to operate > gdalbuildvrt on RGB rasters instead. > > The reason the red areas were occuring in different areas is that > gdalbuildvrt considers only the first file's color table. > > On Tue, Aug 3, 2010 at 8:36 PM, Tacot <[hidden email]> wrote: > > > I think more about the value of data. > http://osgeo-org.1803224.n2.nabble.com/file/n5368754/PixelRed.jpg > > But it's not always the picture on the right which pixels become red; it > can > be also the picture on the left. > I have the felling it depends on the range of merging. > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5368754.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > [hidden email] > > http://lists.osgeo.org/mailman/listinfo/gdal-dev > > > > > -- > Best regards, > Chaitanya kumar CH. > /tʃaɪθənjə/ /kʊmɑr/ > +91-9494447584 > 17.2416N 80.1426E > > _______________________________________________ > gdal-dev mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > > ------------------------------ > View message @ > http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5393675.html > To unsubscribe from Re: [GDAL_TRANSLATE]Problem with colorimetry, click > here. > > > ------------------------------ > View this message in context: RE: [GDAL_TRANSLATE]Problem with > colorimetry<http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Problem-with-colorimetry-tp5368059p5411388.html> > > Sent from the GDAL - Dev mailing list > archive<http://osgeo-org.1803224.n2.nabble.com/GDAL-Dev-f2022644.html>at > Nabble.com. > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev