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

patternTransform difference with librsvg #882

Open
adriaanmeuris opened this issue Feb 10, 2025 · 1 comment
Open

patternTransform difference with librsvg #882

adriaanmeuris opened this issue Feb 10, 2025 · 1 comment

Comments

@adriaanmeuris
Copy link

Hi,

I’ve been investigating an issue in librsvg related to rasterizing SVGs that contain large translations in patternTransform. While exploring alternatives, I came across resvg, and I have to say—its performance and ease of use are truly impressive. Thanks for all the work on this project!

Given the original input SVG, resvg successfully rasterizes it at large output dimensions, which resolves the issue I encountered with librsvg.

However, I’ve noticed a slight discrepancy in pattern translation. When rasterizing with librsvg:

rsvg-convert input.svg -w 2000 -o output-librsvg.png

The output appears correct and aligns with how the SVG is rendered in Chrome, Firefox, and Safari. Using resvg:

resvg --width 2000 input.svg output-resvg.png

The result appears slightly shifted to the right:

librsvg resvg
Image Image

I’m uncertain whether the browser implementations are the definitive reference for correctness since opening the same SVG in Illustrator results in a completely shifted rendering (even though it was originally created in Illustrator 😁 ).

Given this inconsistency, I thought it would be valuable to report this case.

Let me know if any additional details would be helpful.

@RazrFalcon
Copy link
Collaborator

Yes, it's definitely a bit off. Not sure why. Might be related to #628

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

2 participants