-
Notifications
You must be signed in to change notification settings - Fork 93
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
rasterimage return partial image #131
Comments
I have this issue too... a composite SVG that includes a raster image, some gradients, shapes and a text path loads correctly (all elements are present in the Using php 7.4... Any guidance / hints on how to resolve would be very helpful! |
The way to resolve this is to implement the required functionality in this library. At the moment, rendering of gradients is not supported. Text rendering is severely limited as well. In the past few weeks I have spent some time improving rasterization, such as by introducing |
Hi Happy to contribute if I can. Probably would be helpful if the readme gave some better details about what the library is able to do - the currently posted information is rather vague. Clearly what is there currently is not sufficiently clear - otherwise neither @meravwebs nor I would have had the mistaken understanding that rendering of text or shapes was supported. |
Yes, I absolutely agree! Will add "summary of the current feature set" to the to-do-list in #125.
Actually, rendering shapes should be supported. All of the basic geometric shapes (ellipses, rectangles, polygons...) as well as paths support |
Ace - look forward to seeing the summary when it is avail. Another thing that would be useful perhaps would be your thoughts about the priorities for development. The test image I used is attached - it is something created in Pixelmator Pro, and when rendered using the library only the embedded image is shown - the text and star shapes it includes do not get rendered. |
i'm using this code:
$image = SVG::fromString($svg);
$doc = $image->getDocument();
$w = $doc->getWidth();
$h = $doc->getHeight();
$rasterImage = $image->toRasterImage($w, $h);
imagepng($rasterImage, $png_path);
it creates an image, but only partial.
the svg i'm using have image element in it and the image created is only part of the image element of the svg instead of the entire svg.
The text was updated successfully, but these errors were encountered: