After having spent two days attempting to rasterize jpeg\'s from SVG strings using ImageMagick I have finally given up.
Although I managed to get the actual conversi
You could pass your SVG string to inkscape using stdin, but the code is less portable.
// Open Inkscape process
$process = proc_open(
'/path/to/inkscape -z -f /dev/fd/0 -e /path/to/output'
array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')),
$pipes
);
// Write svg to stdin
fwrite($pipes[0], $svg);
// Close process
foreach ($pipes as $pipe) fclose($pipe);
proc_close($process);