如何将PNG图像转换为SVG?


当前回答

I'm assuming that you wish to write software to do this. To do it naively you would just find lines and set the vectors. To do it intelligently, you attempt to fit shapes onto the drawing (model fitting). Additionally, you should attempt to ascertain bitmaped regions (regions you can't model through shames or applying textures. I would not recommend going this route as that it will take quite a bit of time and require a bit of graphics and computer vision knowledge. However, the output will much and scale much better than your original output.

其他回答

有一个网站,你可以上传你的图片,并看到结果。

http://vectormagic.com/home

但是如果你想下载你的svg-image,你需要注册。 (注册即可免费获得2张图片)

I'm assuming that you wish to write software to do this. To do it naively you would just find lines and set the vectors. To do it intelligently, you attempt to fit shapes onto the drawing (model fitting). Additionally, you should attempt to ascertain bitmaped regions (regions you can't model through shames or applying textures. I would not recommend going this route as that it will take quite a bit of time and require a bit of graphics and computer vision knowledge. However, the output will much and scale much better than your original output.

令我惊讶的是,potrace原来只能处理黑色和白色。对于您的用例来说,这可能没问题,但有些人可能会认为缺乏颜色追踪是有问题的。

就我个人而言,我对 向量的魔法

但它仍然不完美。

http://online-converting.com/image/convert-to-svg/可以很好地转换为SVG

我刚刚发现这个问题和答案,因为我正试图做同样的事情!我不想使用其他提到的工具。(不想把我的电子邮件给别人,也不想付钱)。我发现Inkscape (v0.91)可以做得很好。本教程简单易懂。

它很简单,选择你的位图在Inkskape和Shift+Alt+B。