svg problems
Posted: 2018-07-08T08:18:07-07:00
Hello,
I try to use imagick (imagemagick) to convert a SVG to a PNG image. I use the code
I also tried to use with blob function. Same result. Also tried png24 and tried without resize. Every time the same result. (See attachment).
what I do wrong, or is ImageMagick not good for svg conversion?
I try to use imagick (imagemagick) to convert a SVG to a PNG image. I use the code
Code: Select all
$im = new Imagick();
$im->setBackgroundColor(new ImagickPixel('transparent'));
$im->readimage($blumsvg);
$im->setImageFormat("png32");
$im->resizeImage(200, 200, imagick::FILTER_LANCZOS, 0);
$im->writeimage($blumpng); //Image with transparent background
$im->clear();
$im->destroy();
what I do wrong, or is ImageMagick not good for svg conversion?