When using the following code to convert an SVG to a PNG file, the text looks terrible. The image is not scaled, so I have no idea why the quality of the text is so bad.
Additionally, although it is hard to see, the text in the PNG seems to be some serif font, while the text in the SVG is sans-serif.
Edit: I just noticed that the special chars seem to be messed up in the word "Kreuzworträtsel".
What can I do to fix the issues?
$image = new Imagick();
$image->setResolution(288, 288);
$image->readImageBlob($svg);
$image->setImageformat('png24');
header('Content-Type: image/png');
echo $image->getImageBlob();
This is the SVG: https://www.dropbox.com/s/22hewf59cmcv92k/SVG.svg?dl=0
This is the converted PNG: https://www.dropbox.com/s/c5mihvmmlyu9kx8/PNG.png?dl=0
The quality problem is hard to see in the scaled down version, check out the link above.
Imagick::getVersion()
returns ImageMagick 6.8.9-7 Q16 x86_64 2015-04-09 http://www.imagemagick.org.