readimageblob: Fatal Error when converting SVG into PNG

前端 未结 2 1245
渐次进展
渐次进展 2021-01-11 22:58

I\'m trying to use Image-Magick with PHP to convert SVG text into a PNG image. This SVG is a chart generated with NVD3 and I\'d like to allow my users to download it as an i

2条回答
  •  隐瞒了意图╮
    2021-01-11 23:51

    svg file text structure needs to be specified for readImageBlob to decode the file. Prepend to your variable having svg text.

    $svg = ''.$svg;
    

    And you are good to go.

提交回复
热议问题