Convert SVG image to PNG with PHP

That’s funny you asked this, I just did this recently for my work’s site and I was thinking I should write a tutorial… Here is how to do it with PHP/Imagick, which uses ImageMagick: $usmap = ‘/path/to/blank/us-map.svg’; $im = new Imagick(); $svg = file_get_contents($usmap); /*loop to color each state as needed, something like*/ $idColorArray = … Read more