title: SVG to PNG image conversion in php
body: <p>I want to convert SVG images to PNG files with transparent background. I am using below code to convert it using imagick in php,but it gives image with black background.</p>
  
  <pre><code>        $image = new imagick();
          //set transparent background
          $image-&gt;setBackgroundColor(new ImagickPixel('transparent'));
          $image-&gt;setFormat('svg');
          $image-&gt;readImageBlob(file_get_contents("image.svg"));
          $image-&gt;setImageFormat("png32");
          $image-&gt;resizeImage(265,195, Imagick::FILTER_LANCZOS, 1);
          $image-&gt;writeImage('result.png');
  </code></pre>
  
  <p>Can anyone please help me how to convert above svg image to png image using PHP.
  Any help would be appreciated.</p>