Answer the question
In order to leave comments, you need to log in
How to properly convert SVG to PNG using PHP:ImageMagick?
Worth Imagick there is a picture in SVG at the Norgs https://www.yr.no/en/content/67.568007,33.391146/m... I
try to convert the task to png on the fly
$svg = file_get_contents($url);
$im = new Imagick();
$im->readImageBlob('<?xml version="1.0" encoding="UTF-8" standalone="no"?>'.$svg);
$im->setImageFormat("png24");
header('Content-Type: image/png');
echo $im;
$imagic->clear();
$imagic->destroy();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question