Open
Description
Not much to explain here, the issue is quite simple. I hope the fix will be simple too 🤞🏻 I've attached some renders of a test image. I tested in resvg 0.41 and 0.43
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1.5 1.5">
<rect fill="green" width="1.7" height="1.7"/>
<rect fill="blue" width="1.5" height="1.5"/>
<rect fill="red" width="1.2" height="1.2"/>
</svg>
note that this is less of an issue when rounded up, but quite a big issue when rounded down, since some SVGs are perfectly cut to their contents. I feel that a suitable hotfix would be always rounding up, and cutting the resulting bitmap image to the proper size afterwards.
I didn't test whether aspect ratio is preserved e.g. when viewBox="0 0 1.5 2"
, but I assume that's also an issue.
Metadata
Metadata
Assignees
Labels
No labels