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

SVG to raster conversion improvement #1391

Open
l2nkxk8z opened this issue Oct 6, 2024 · 10 comments
Open

SVG to raster conversion improvement #1391

l2nkxk8z opened this issue Oct 6, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@l2nkxk8z
Copy link

l2nkxk8z commented Oct 6, 2024

Is your feature request related to a problem? Please describe.
I've tried converting an SVG image to PNG and got terrible results.

Describe the solution you'd like
Integrate librsvg or lunasvg library for conversations.

Describe alternatives you've considered

@l2nkxk8z l2nkxk8z added the enhancement New feature or request label Oct 6, 2024
@T8RIN
Copy link
Owner

T8RIN commented Oct 6, 2024

And what's wrong with conversion? Some examples maybe?

@l2nkxk8z
Copy link
Author

l2nkxk8z commented Oct 6, 2024

Sorry. it comes out blurry. I think the problem may be resizing, by default it was 200x200 and I changed it but 200x200 didn't seem ideal either, not sure if some scaling mode fixes is this but I've head a very similar result with graphicsmagick. here's an example:

SVG
cromite2

PNG imagetoolbox
q5ejoEOMjb3L2ul68iRN2ELrGuG11rZC

PNG librsvg
cromitersvg

@T8RIN
Copy link
Owner

T8RIN commented Oct 6, 2024

You large image output, svg needs more space to draw normally

@T8RIN
Copy link
Owner

T8RIN commented Oct 6, 2024

You need to set large image output, svg needs more space to draw normally

@l2nkxk8z
Copy link
Author

l2nkxk8z commented Oct 6, 2024

Not sure what you mean by image output, I did change height and width to same one as rsvg. are you talking about something else?

@T8RIN
Copy link
Owner

T8RIN commented Oct 6, 2024

I'm about size, try 1000*1000 i can't change the Library now btw

@l2nkxk8z
Copy link
Author

l2nkxk8z commented Oct 7, 2024

I tried 4000x4000 and it still was blurry. alright, it's not a big deal if you can't change it.

@T8RIN
Copy link
Owner

T8RIN commented Oct 7, 2024

I have troubles with compiling native libraries by ndk, but if there's pre compiled one with jni bindings, i can add this easily

@l2nkxk8z
Copy link
Author

l2nkxk8z commented Oct 8, 2024

I don't know enough about software development to give you an advice, maybe there is another library that has better android support.

I found this list of some libraries, might be useful:
https://github.com/zhanba/awesome-2d-graphics-rendering?tab=readme-ov-file#2d-renderer

@T8RIN
Copy link
Owner

T8RIN commented Oct 8, 2024

😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants