Olivier Delrieu
2012-Feb-25 16:34 UTC
[R] embed a bitmap by link reference into a SVG image
I would like, in R, to embed a bitmap image /by link reference/ into a SVG plot image. Images may be included in an SVG by http://www.w3.org/TR/SVG/struct.html#ImageElementHrefAttribute link reference , or even http://en.wikipedia.org/wiki/Data_Uri data , for example: My objective is to reduce the size of the SVG image files I am generating (My plots have about 10? points: that's a 250Mb SVG file requiring 8Gb RAM for editing with http://inkscape.org/ inkscape ). I was thinking generating most of the plot as a bitmap image (say PNG), and some key elements of the plot (the ones that will later have to be edited by hand) as an SVG image, and then combine both images using the trick I've just described above. I have tried to use the pixmap library, but the bitmap is added as a vectorial image, dot by dot, which would not reduce the overall file size: Any thoughts on the way to do this would be more than welcome. Many thanks. -- View this message in context: http://r.789695.n4.nabble.com/embed-a-bitmap-by-link-reference-into-a-SVG-image-tp4420435p4420435.html Sent from the R help mailing list archive at Nabble.com.