我有一个 PHP 应用程序,使用 base64 SVG 字符串显示图像,如下所示:
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMSAzMSI+PHBhdGggZD0iTTE1LjUgMC41Yy04LjI3MSAwLTE1IDYuNzI5LTE1IDE1LjAwMWMwIDguMyA2LjcgMTUgMTUgMTQuOTk5YzguMjY5IDAgMTUtNi43MjkgMTUtMTQuOTk5IEMzMC41IDcuMiAyMy44IDAuNSAxNS41IDAuNXogTTE1LjUgMjYuNzM3Yy02LjE5NiAwLTExLjIzNy01LjA0MS0xMS4yMzctMTEuMjM2YzAtNi4xOTYgNS4wNDEtMTEuMjM3IDExLjIzNy0xMS4yMzcgYzYuMTk1IDAgMTEuMiA1IDExLjIgMTEuMjM3QzI2LjczNCAyMS43IDIxLjcgMjYuNyAxNS41IDI2LjczN3oiLz48cG9seWdvbiBwb2ludHM9IjE3LDguNiAxNCw4LjYgMTQsMTQgOC42LDE0IDguNiwxNyAxNCwxNyAxNCwyMi40IDE3LDIyLjQgMTcsMTcgMjIuNCwxNyAyMi40LDE0IDE3LDE0Ii8+PC9zdmc+"/>
我需要输出并显示 PNG 文件 我已经安装 Imagick ,但是如何将base64 SVG字符串转换为PNG文件?