使用 ImageMagick 6.9.3-8 Q16 将 SVG 转换为 png



我正在尝试使用 ImageMagick 6.9.3-8 Q16 版本转换 SVG 文件。但它不适用于下面的通信。

$command= 'convert -size "95"x"95" xc:white -fill grey -stroke grey -draw "'.$path.'" "'.$thumbImage.'"';

展开上述命令并尝试使用命令提示符进行转换后,其工作正常。

convert -size "95"x"95" xc:white -fill grey -stroke grey -draw "path ' M 10,20 C 10,20 20,20 20,10 L 20,10 75,10 C 75,10 75,20 85,20 L 85,20 85,75 C 85,75 75,75 75,85 L 75,85 20,85 C 20,85 20,75 10,75 L 10,75 10,20 L 10,20 0,20 0,0 0,80 L 0,80 10,80 C 10,80 15,80 15,85 L 10,85 10,80 0,80 0,95 80,95 80,85 C 80,85 80,80 85,80 L 85,80 85,85 80,85 80,95 95,95 95,15 85,15 C 85,15 80,15 80,10 L 80,10 85,10 85,15 95,15 95,0 15,0 15,10 C 15,10 15,15 10,15 L 10,10 15,10 15,0 0,0 0,20 '" "./designermatthumb/thumb_matdesign_1.png"

命令正确。我发现了我的错误。我忘了为文件夹设置文件属性。 谢谢

最新更新