Closed Gaubee closed 2 months ago
Yes, this is an expected behavior. There are no memory usage limits in resvg
.
I assume you wanted to use filterUnits="userSpaceOnUse"
instead of filterUnits="objectBoundingBox"
. Because right now your SVG requesting a 235567x51484px image.
Yes, this is an expected behavior. There are no memory usage limits in
resvg
. I assume you wanted to usefilterUnits="userSpaceOnUse"
instead offilterUnits="objectBoundingBox"
. Because right now your SVG requesting a 235567x51484px image.
Thank you for your response. I'm not an SVG expert; I'm just using resvg as the solution for rendering SVGs in my application. I'm currently using it as a dynamic link library to meet the SVG rendering needs in mobile. This leads to unbounded memory usage, causing the application to crash. Do you have any suggestions for this?
Currently, there are no plans on adding memory usage limits.
All you can do right now is too walk over nodes and check their bboxes. But if you're using resvg
as a C library then there is no way to do so either.
Or you can fork resvg
and add necessary checks yourself.
I have added #815 to track this issue.
just try this svg. version 0.42.0~0.43.0