[R] How to write a BMP file pixel by pixel?

ZHANG Yingqi zhangyingqi at ivpp.ac.cn
Fri May 4 03:10:17 CEST 2012


Dear all,
       I open a bmp device by the bmp() function in the png package, but I don't know how to write color pixel by pixel into the file? Any help or hint?
       What I want to do is to create a 512*512 bmp file with certain dots being red and others black. I have all the pixel coordinates for the red dots, but I don't know how to draw the color on the device.
       Please help me!

Sincerely yours, 
  Yingqi
********************

Yingqi ZHANG    

Beijing P.O. Box 643, China 100044
Institute of Vertebrate Paleontology and Paleoanthropology (IVPP)
Chinese Academy of Sciences
Tel: +86-10-88369378     Fax: +86-10-68337001
Email: arvicolid at gmail.com



More information about the R-help mailing list