Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy rasterization image #222

Open
FatGalah-Timothy opened this issue Mar 8, 2024 · 0 comments
Open

Buggy rasterization image #222

FatGalah-Timothy opened this issue Mar 8, 2024 · 0 comments

Comments

@FatGalah-Timothy
Copy link

I am trying to use the library to convert a svg into a png

$svg = file_get_contents(__DIR__ . '/download.svg');

include ( __DIR__ . '/php-svg/autoloader.php' );
use SVG\SVG;
$image = SVG::fromString($svg);


$rasterImage = $image->toRasterImage(100, 600);
header('Content-Type: image/png');
imagepng($rasterImage);

SVG download

Output download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant