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

Rasterization does not handle gradients, transforms, implicit commands #30

Open
denvist opened this issue Sep 17, 2017 · 5 comments
Open
Labels
bug Something isn't working

Comments

@denvist
Copy link

denvist commented Sep 17, 2017

Code from example:

<?php
require_once __DIR__.'/php-svg/autoloader.php';
use SVG\SVGImage;
$image = SVGImage::fromFile("bodygraph.svg");
$rasterImage = $image->toRasterImage(600, 600);
header('Content-Type: image/png');
imagepng($rasterImage);
?>

Original SVG Image: bodygraph.svg

Rendered PNG Image: rendered image

@denvist
Copy link
Author

denvist commented Sep 17, 2017

Even i modify code to render SVG Image:
<?php
require_once __DIR__.'/php-svg/autoloader.php';
use SVG\SVGImage;
$image = SVGImage::fromFile("bodygraph.svg");
header('Content-Type: image/svg+xml');
echo $image;

Result is not good: where is no gradient and notes.
Rendered SVG Image

@meyfa meyfa added the bug Something isn't working label Sep 17, 2017
@meyfa
Copy link
Owner

meyfa commented Sep 17, 2017

I agree, that is a terrible result. Thank you for making the effort of reporting your experience.

Could you perhaps send a link to the original SVG file so that I have something to test with?

@meyfa meyfa changed the title Useless library. Unfortunately Rasterization does not handle gradients, transforms, implicit commands Sep 24, 2017
@meyfa
Copy link
Owner

meyfa commented Sep 24, 2017

There is some progress. The result is still nowhere near the original, but it's getting better. (This comment will be updated whenever things improve.)

Task list for tracking things that need to be implemented:

bodygraph

@binaryhq
Copy link

binaryhq commented Dec 5, 2018

any update on this?

@jan-potuznik
Copy link

I tried Your own example provided in README.md under "Rasterizing" and it ignores stroke-width.

@meyfa meyfa mentioned this issue Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants