T8RIN / ImageToolbox

🖼️ Image Toolbox is a powerful app for advanced image manipulation. It offers dozens of features, from basic tools like crop and draw to filters, OCR, and a wide range of image processing options
Apache License 2.0
3.68k stars 173 forks source link

SVG to raster conversion improvement #1391

Open l2nkxk8z opened 5 days ago

l2nkxk8z commented 5 days ago

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

T8RIN commented 5 days ago

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

l2nkxk8z commented 5 days ago

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 commented 5 days ago

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

T8RIN commented 5 days ago

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

l2nkxk8z commented 5 days ago

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 commented 5 days ago

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

l2nkxk8z commented 4 days ago

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

T8RIN commented 4 days ago

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 commented 3 days ago

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 commented 3 days ago

😢