Niko Lang
Niko Lang

Reputation: 897

Convert SVG to PNG with GD

I want to convert an SVG image to a PNG in PHP. I know how to do it in Imagemagick but I dont get it to work on my Webserver and it seems SVG support is not very good with imagemagick.

So how can I do it with GD and is SVG even supported?

Upvotes: 7

Views: 10533

Answers (2)

MichaelK
MichaelK

Reputation: 143

Nowadays you can rasterize SVG via GD with https://github.com/meyfa/php-svg

Upvotes: 0

Niko Lang
Niko Lang

Reputation: 897

Sadly, GD2 does not support SVG. I had to install a unix virtual machine and I am trying with Imagick, that supports SVG.

Upvotes: 6

Related Questions