使用 C# 将 SVG 转换为 PNG [英] Converting SVG to PNG using C#
问题描述
我一直在尝试使用 C# 将 SVG 图像转换为 PNG,而无需编写太多代码.任何人都可以推荐一个库或示例代码来执行此操作吗?
I've been trying to convert SVG images to PNG using C#, without having to write too much code. Can anyone recommend a library or example code for doing this?
推荐答案
你可以调用inkscape的命令行版本来做到这一点:
You can call the command-line version of inkscape to do this:
http://harriyott.com/2008/05/converting-svg-images-to-png-in-c.aspx
还有一个 C# SVG 渲染引擎,主要用于允许在 web 上使用 SVG 文件在 codeplex 上,如果这是您的问题,它可能适合您的需求:
Also there is a C# SVG rendering engine, primarily designed to allow SVG files to be used on the web on codeplex that might suit your needs if that is your problem:
原始项目
http://www.codeplex.com/svg
分叉修复和更多活动:(2013 年 7 月添加)
https://github.com/vvvv/SVG
Fork with fixes and more activity: (added 7/2013)
https://github.com/vvvv/SVG
这篇关于使用 C# 将 SVG 转换为 PNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!