Misplaced rasterized SVG elements
Posted: 2011-08-15T13:18:45-07:00
Hi, iḿ using this little chunk of code to convert from SVG to JPG using IMagick API.
The code works flawlessly, but the rasterized JPG got some elements misplaces (I tthink that the rotated ones only)
This is the code
I have attached the SVG file, that loads OK in InkScape and this is the rasterized image
Also tested with commandline "convert" but same result.
Please advise, is the last think to finish my project.
Thans a lot!
The code works flawlessly, but the rasterized JPG got some elements misplaces (I tthink that the rotated ones only)
This is the code
Code: Select all
<?php
$usmap = '/www/docs/.com.ar/public_html/presugen/export/svgGenerado.svg';
$im = new Imagick();
$svgin = file_get_contents($usmap);
$im->readImageBlob($svgin);
/*jpeg settings*/
$im->setImageFormat("jpeg");
$im->writeImage('/www/docs/.com.ar/public_html/presugen/export/svgRasterizado.jpg');/*(or .jpg)*/
$im->clear();
$im->destroy();
?>
Please advise, is the last think to finish my project.
Thans a lot!