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

Drop shadow lost on render to png #317

Closed
razzeee opened this issue Mar 23, 2024 · 5 comments
Closed

Drop shadow lost on render to png #317

razzeee opened this issue Mar 23, 2024 · 5 comments

Comments

@razzeee
Copy link

razzeee commented Mar 23, 2024

I'm currently creating a svg on the fly with a filter specifically drop-shadow, but it doesn't seem to reach the png when rendering it to png.

You can find my code here flathub-infra/website#2771

Do you think this might be a problem in resvg itself?

@yisibl
Copy link
Member

yisibl commented Mar 24, 2024

Please provide a static SVG code that can be reproduced.

@razzeee
Copy link
Author

razzeee commented Mar 24, 2024

repro

Let me know if this is not what you asked for :)

@yisibl
Copy link
Member

yisibl commented Mar 25, 2024

You're using style="filter:drop-shadow(0 40px 30px rgba(0, 0, 0, 42))", and I'm not sure if the upstream resvg supports this CSS syntax. Usually, if a feature doesn't work, you need to look for the SVG syntax.

For example: filter="drop-shadow(blue 4 5 6)", see https://raw.githubusercontent.com/RazrFalcon/resvg/5b97397af1bc995f849b274118039afa6f4d1ee3/crates/resvg/tests/tests/filters/filter-functions/drop-shadow-function.svg

This is beyond the scope of resvg-js, you can try submitting an issue upstream.

@razzeee
Copy link
Author

razzeee commented Mar 25, 2024

Thank you

@razzeee
Copy link
Author

razzeee commented Mar 25, 2024

Part of the problem seems to be the used version of resvg, as far as I can tell.

So I'll probably have to wait for #293 or even later.

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