You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将含animateTransform的SVG动画转换为GIF动图?

SVG transform动画转GIF动图可行吗?

简而言之:能否将SVG的transform动画转换为GIF动图?

我有一个通过animateTransform实现齿轮旋转的SVG加载动画,代码如下:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg version="1.1" baseProfile="full" width="213" height="180" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">    
<image id="gear1" x="0" y="0" width="92" height="92" xlink:href="gear1.svg"/>    
<image id="gear2" x="57.5" y="57.5" width="122" height="122" xlink:href="gear2.svg" transform="rotate(16.875 118.5 118.5)"/>    
<image id="gear3" x="149" y="24" width="64" height="64" xlink:href="gear3.svg"/>    
<animateTransform xlink:href="#gear1" attributeName="transform" attributeType="XML" type="rotate" from="0 46 46" to="360 46 46" dur="6s" repeatCount="indefinite"/>    
<animateTransform xlink:href="#gear2" attributeName="transform" attributeType="XML" type="rotate" to="16.875 118.5 118.5" from="376.875 118.5 118.5" dur="8s" repeatCount="indefinite"/>    
<animateTransform xlink:href="#gear3" attributeName="transform" attributeType="XML" type="rotate" from="0 181 56" to="360 181 56" dur="4s" repeatCount="indefinite"/></svg>

我尝试过多款在线转换服务,均未得到有效结果:

  • cloudconvert.com:生成空白单色白色图片
  • convert.io:生成损坏的图片
  • convertio.co:生成损坏的图片
  • freeconvert.com:出现服务器错误
  • zamzar.com:生成空白单色非白色图片

希望通过开发者方案(控制台/JavaScript脚本)将该SVG转换为单张图片或序列帧,请问是否可行?


内容的提问来源于stack exchange,提问作者trejder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.21 17:54:56