Page 1 of 1

SVG has white background instead of transparent

Posted: 2012-08-05T13:53:09-07:00
by Jedateach
I'm getting a white background whenever I convert svg to png using php magickwand. Is this a bug?

php magickwand version: 1.0.8
ImageMagick version: 6.7.8-3

Code: Select all

$wand = NewMagickWand();
$transparentColor = NewPixelWand();
MagickReadImage($wand,"RAID_5.svg");
PixelSetColor($transparentColor, 'transparent');
MagickSetBackgroundColor($wand, $transparentColor);

MagickSetImageFormat($wand,"PNG24");
header('Content-Type: image/png');
MagickEchoImageBlob($wand);
Related: http://stackoverflow.com/questions/4149 ... magickwand