[R] reading BMP into R

Michael Sumner mdsumner at utas.edu.au
Tue Mar 13 23:09:55 CET 2007


Another way:

require(sp)
require(rgdal)

library(rgdal)

## read using one of the many GDAL drivers
d <- readGDAL("im.bmp")
summary(d)

## map colours for RGB and display
col <- SGDF2PCT(d)
d$idx <- col$idx
image(d, "idx", col = col$ct)

## Available drivers:
gdalDrivers()



Milton Cezar Ribeiro wrote:
 >/ Hi R-gurus
/>/ />/ How can I read my "bmp" files into R?
/>/ />/ Kind regards,
/>/ />/ />/ miltinho
/>/ Brazil /
 >/ /



More information about the R-help mailing list