Re: [R] PPM to BMP converter

2012-05-09 Thread Michael Sumner
You could write it to BMP with rgdal, i.e. with dummy "world" coordinates: x1 <- list(x = 1:5, y = 1:4, z = matrix(1:20, 5, 4)) require(sp) x2 <- image2Grid(x1) require(rgdal) writeGDAL(x2, "file.bmp", driver = "BMP", type = "Byte", mvFlag = 255) (I am not familiar with the details of what BMP

Re: [R] PPM to BMP converter

2012-05-09 Thread Jan van der Laan
I don't know if any R-packages exist that can do this, but you could install imagemagick (http://www.imagemagick.org), which provides command line tools for image manipulation and conversion, and call these from R using system. Something like: system("convert yourimage.ppm yourimage.bmp")

[R] PPM to BMP converter

2012-05-08 Thread ZHANG Yingqi
Dear all, Several days ago, I posted How to write a bmp file pixel by pixel. Instead of bmp, I succeeded in writing a PPM file by using the pixmap package. Thanks for the hint generously provided by Uwe Ligges. Now I have a new question. How to convert a PPM file to BMP file in R