Yngvarr

Generation

generate functionFri, 25 Nov 2022

svg to jpg

<?php $svg = <<< EOT ... ... ... EOT; $svg = file_get_contents('https://cdn3.iconfinder.com/data/icons/google-material-design-icons/48/ic_announcement_48px.svg'); $im = new Imagick(); $im->setBackgroundColor(new ImagickPixel('transparent')); $im->readImageBlob($svg); $im->setImageFormat("jpg"); $im->writeImage('image.jpg'); ?>

Questions about programming?Chat with your personal AI assistant