如何将PNG图像转换为SVG?
当前回答
这个工具现在工作得很好。
http://www.mobilefish.com/services/image2svg/image2svg.php
其他回答
你可能想看看potrace。
我刚刚发现这个问题和答案,因为我正试图做同样的事情!我不想使用其他提到的工具。(不想把我的电子邮件给别人,也不想付钱)。我发现Inkscape (v0.91)可以做得很好。本教程简单易懂。
它很简单,选择你的位图在Inkskape和Shift+Alt+B。
png是位图图像风格,SVG是支持位图的基于矢量的图形设计,因此它不会将图像转换为矢量,只是将图像嵌入到基于矢量的格式中。你可以使用免费的http://www.inkscape.org/来实现。它会嵌入它,但是它也有一个Live Trace之类的引擎,如果你愿意,它会尝试将它转换为路径(使用potrace)。查看adobe illustrator中的实时跟踪(商业)是一个例子:
http://graphicssoft.about.com/od/illustrator/ss/sflivetrace.htm
令我惊讶的是,potrace原来只能处理黑色和白色。对于您的用例来说,这可能没问题,但有些人可能会认为缺乏颜色追踪是有问题的。
就我个人而言,我对 向量的魔法
但它仍然不完美。
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.