Abstract
This chapter presents how to read and write images with R in vector and raster formats. Different packages providing procedures for input and output are available. For vector formats, the package grImport is used. It provides functions for reading vector images and also for manipulation. In the case of raster images, the main packages available for input are: pixmap, png, rtiff, ReadImages, EBImage and bmp. These packages, and additionally the jpeg library, are used for writing in raster formats. In order to write an image in vector formats, some devices as postscript, pdf, and svg can be used. The new support for rendering raster formats in R is also presented in this chapter. The main advantages of using this new support is the better scaling, faster rendering, and smaller graphics files.
Either write something worth reading or do something worthwriting. Benjamin Franklin.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Bah, T. (2011). Inkscape: guide to a vector drawing program (4th ed.). New York: SourceForge Community Press.
Murrel, P. (2011). R Graphics (2nd ed.). Boca Raton: CRC Press.
Murrell, P. (2009). Importing vector graphics: The grImport package for R. Journal of Statistical Software, 30(4), 1–37. URL http://www.jstatsoft.org/v30/i04/
Murrell, P. (2011). Raster images in R graphics. The R Journal, 3(1), 48–54. http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Murrell.pdf
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2013 Alejandro C. Frery
About this chapter
Cite this chapter
Frery, A.C., Perciano, T. (2013). Reading and Writing Images with R: Generating High Quality Output. In: Introduction to Image Processing Using R. SpringerBriefs in Computer Science. Springer, London. https://doi.org/10.1007/978-1-4471-4950-7_3
Download citation
DOI: https://doi.org/10.1007/978-1-4471-4950-7_3
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-4949-1
Online ISBN: 978-1-4471-4950-7
eBook Packages: Computer ScienceComputer Science (R0)