要解决 OP 问题:
如何在 linux 中将其解码为 .svg 文件?
由于linux默认有python,我建议使用python脚本。
这是一个工作示例:
import base64
#change "YOURFILE" with the name of your original file
with open("YOURFILE", "rb") as f: encoded = f.read()
encoded = encoded.replace("data:image/svg+xml;base64,", "")
decoded = base64.b64decode(encoded)
#change "NEWFILE" with the name that you want to give your new svg
with open("NEWFILE.svg", "wb") as f: f.write(decoded)
Run Code Online (Sandbox Code Playgroud)
如果您是 Python 新手,只需将上面的代码复制粘贴到一个带有.py扩展名的文件中,例如aaabbb.py,然后像这样执行它:
python aaabbb.py
Run Code Online (Sandbox Code Playgroud)