Open
Description
ImageMagick version
8:6.9.11.60+dfsg-1.6+deb12u2
Operating system
Linux
Operating system, version and so on
Debian Stable (Bookworm)
Description
Hi,
if I load an svg file in a php script and convert it to png, the resulting image is broken, doesn't respect the original.
Steps to Reproduce
<?php
$svgFile = 'input.svg';
$outputPng = 'output.png';
try {
$imagick = new Imagick();
$imagick->setResolution(300, 300);
$imagick->readImage($svgFile);
$imagick->setImageFormat('png');
$imagick = $imagick->flattenImages();
$imagick->writeImage($outputPng);
$imagick->clear();
$imagick->destroy();
echo "SVG converted to PNG successfully.\n";
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage() . "\n";
}
?>
Images
Metadata
Metadata
Assignees
Labels
No labels