SVG矢量图形可以转换为PNG文件格式以便在Fireworks中使用吗?
众所周知,有很多网站出售免版税图形。有些网站出售矢量图形 (svg) 或为您提供下载矢量图形的选项。
我没有支持 SVG 的图形编辑器。目前,我正在使用旧版本的 Fireworks。我无法打开 SVG 文件类型。 (我也买不起 PhotoShop 或 Illustrator 软件)。
我的 PC 上运行的是 Windows。
问题:
- 我有哪些选择?
- 有 SVG 到 PNG 转换器吗?
- 转换后的文件会正确保留所有内容吗?
- 我可以像处理 PNG 一样处理转换后的 SVG 文件吗?
As many of you know, there are quite a few websites that sell royalty free graphics. Some sites sell vector graphics (svg) or give you the option to download them as such.
I don't have a graphics editor that will support SVG. Currently, I'm working with an older version of Fireworks. I cannot open a SVG file type. (I also cannot afford to purchase PhotoShop or Illustrator software).
I'm running Windows on my PC.
Questions:
- What are my options?
- Is there a SVG to PNG converter?
- Would the converted file retain everything correctly?
- Would I be able to work with the converted SVG file as I do a PNG?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我建议下载 Inkscape,它是相当于 Illustrator 的免费软件。它可以将 svg 导出为 png,并使用 SVG 作为其本机图像格式。
I'd recommend downloading Inkscape, which is the freeware equivalent of Illustrator. It can export svg to png, and it uses SVG as its native image format.
我猜你在 Windows 上,但在 Linux 上我使用 librsvg2-bin< /a>.
然后使用 rsvg-convert -o output.png input.svg
快速谷歌搜索给我带来了如果你只能使用Windows:http://www.openclipart.org/wiki/SVG_Tools
I'm going to guess you're on Windows, but on Linux I use librsvg2-bin.
Then use
rsvg-convert -o output.png input.svg
A quick google search brought me this if you're only going to be able to use Windows: http://www.openclipart.org/wiki/SVG_Tools
对于单个图像,如果您不想安装任何额外的软件,您可以执行以下操作(在 Windows 上,应该在 Linux 上类似地工作):
请注意:透明度将丢失(如@come-raczy所述) )
的
width
和height
属性> 满足您需求的节点For a single image, if you do not want to install any additional SW, you can do the following (on Windows, should work on Linux similarly):
Please note: Transparency will be lost (as stated by @come-raczy)
width
andheight
attributes of the<svg></svg>
node to your needs<WINDOWS><SHIFT>S
svgexport 是一个 Node.js 模块和命令行工具,在SVG 到 PNG 转换器。它使用 Pupeteer,这是一个通过 DevTools 协议控制无头 Chrome/Chromium 的库。
重要亮点包括:
NPM 链接提供了安装说明 (
npm install svgexport -g
),但不提供所有依赖项。在 WSL Ubuntu 上,我必须安装额外的库:基本用法非常简单:
有额外的选项来控制样式、质量、大小和格式(png、jpg 或 jpeg)。
svgexport is a Node.js module and command-line tool that is very good in the context of SVG to PNG converters. It uses Pupeteer, a library to control headless Chrome/Chromium over DevTools Protocol.
Important highlights include:
The link to NPM provides the install instructions (
npm install svgexport -g
) but doesn't provide all dependencies. On WSL Ubuntu, I had to install additional libraries:Basic usage is very straightforward:
There are additional options to control style, quality, sizes, and format (png, jpg, or jpeg).