I have a svg with multiple definitions for backgrounds.
The svg outputs it just as it should but when I want to convert it with Imagick only the outlines are visible and not the backgrounds.
I've already tried with absolute and relative paths to the images.
Here are some parts of the code:
SVG:
<defs>
<pattern height="486" width="595" patternUnits="userSpaceOnUse" id="bgImage">
<image height="20" width="20" y="0" x="0" xlink:href="/path/to/image.jpg"></image>
</pattern>
</defs>
<path d="..." fill="url(#bgImage)" stroke="#000000">
PHP:
$im = new Imagick();
try {
$im->setBackgroundColor(new ImagickPixel("transparent"));
$im->readImageBlob($svg);
$im->setImageFormat("png24");
header("Content-Type: image/png");
echo $im;
$im->writeImage('output/convert.png');
}
catch (ImagickException $e) {
echo $e;
}
$im->clear();
$im->destroy();