如何在R中将SVG图像导出到PNG文件? [英] How to export svg image to png file in r?

查看:85
本文介绍了如何在R中将SVG图像导出到PNG文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些要使用r导出为png文件的svg图像.有功能可以做到这一点吗?到目前为止,我只发现了将r绘图导出为png的函数.

I have some svg images that I want to export as png files, using r. Is there a function that can do that? Until now I only found function that export r plots to png.

但是我如何导出例如这个例子是png吗?

But how could I export e.g. this example as a png?

<svg height="100" width="100">
  <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg> 

推荐答案

rsvg https://github.com/jeroenooms/rsvg 专门用于执行此操作,我会说它很快完成了.

rsvg https://github.com/jeroenooms/rsvg is designed to specifically to do this, and I'll say it does it very quickly.

这篇关于如何在R中将SVG图像导出到PNG文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆