是否可以通过用标准 svg 元素替换使用标签来简化/清理 svg 代码?也许是一个inkscape插件?什么都没找到...
背景:我正在使用 javafx 的生产套件将一些 svgs 转换为 javafx 图形 (.fxz)。并且该工具不理解 <use>
元素。
最佳答案
Scour is an open-source Python script that aggressively cleans SVG files, removing a lot of 'cruft' that certain tools or authors embed into their documents. The goal of scour is to provide an identically rendered image (i.e. a scoured document should have no discernable visible differences from the original file).
他们还有一个 extension for Inkscape从第 48 版开始。要使用它,请转到“另存为..”并选择“优化的 .SVG。小心,并检查您的输出,因为我发现它也可以得到 侵略性。以这些例子为例,如果他们出现...
好:坏:
他们声称拥有和 online tool这样做的技巧相同……但截至 2011 年 6 月,它不起作用。希望这可以帮助您清理那些经常看起来很吓人的 SVG。有时我觉得我是唯一一个意识到这种格式的能力的人!
关于svg - 如何简化SVG代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1824677/