views:

197

answers:

1

Hi,

I'm importing SVGs with imagick using this syntax

$graphic = new Imagick($this->img);

The problem is this image is imported with a white background. How can I change the white background to a transparent one, or make imagick keep then transparent background when importing the SVG.

A: 

I can't help you with imagick. However, I know that an SVG with a transparent background gets converted to a PDF with transparent background if I use this ImageMagick ClI command:

convert -background none some.svg some.pdf

and if I use

convert -background gray some.svg some.pdf

the PDF indeed has a gray background.

pipitas