gpt4 book ai didi

svg - 如何简化SVG代码?

转载 作者:行者123 更新时间:2023-12-04 15:29:25 31 4
gpt4 key购买 nike

是否可以通过用标准 svg 元素替换使用标签来简化/清理 svg 代码?也许是一个inkscape插件?什么都没找到...

背景:我正在使用 javafx 的生产套件将一些 svgs 转换为 javafx 图形 (.fxz)。并且该工具不理解 <use>元素。

最佳答案

看看Scour - an SVG scrubber

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。小心,并检查您的输出,因为我发现它也可以得到 侵略性。以这些例子为例,如果他们出现...

好: Original SVG, only slightly mucked with..坏: After a harsh "Scouring"

他们声称拥有和 online tool这样做的技巧相同……但截至 2011 年 6 月,它不起作用。希望这可以帮助您清理那些经常看起来很吓人的 SVG。有时我觉得我是唯一一个意识到这种格式的能力的人!

关于svg - 如何简化SVG代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1824677/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com