By default, image() displays the first band of a SpatialGrid*DataFrame - 
controlled by the second argument - column number or name.

You can display a 3-band RGB image by creating a new band and lut - 
check out the example in  ?SGDF2PCT



Agustin Lobo wrote:
> Hi,
>
> Is image() able to display a color composite?
>
> I've made an 8 bit color composite (with another software), saved it as
> geotif and then, in R:
>
> t1pcs <- readGDAL("G:/PERU/imorm2007/test1TNT/PC1_3s8.tif")
> image(t1pcs)
>
> but the color table seems wrong. I've checked with other programs, i.e.,
> IrfanView, and the file is correct. So I think that the problem is that
> col = heat.colors(12) is set by default, and the SpatialGridDataFrame
> object created by rgdal does not keep the color table.
>
> I've also tried with a 24-bit composite, and in that case rgdal imports
> as a 3-layer image.
>
> Is there any specific way I could import the color table of the
> composite image?
>
> Thanks
>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to