Closed BoostCookie closed 4 months ago
While we could possibly use nanosvg or lunasvg, their support is also incomplete so whether it works would depend on the specific svg. In addition, parsing the SVG and drawing an 8k image isn't going to be instantaneous...
You can try with other formats, including uncompressed ones to see if that's faster.
We should already support SVG via gdk-pixbuf. Maybe make sure the proper gdk-pixbuf plugin in installed.
We should already support SVG via gdk-pixbuf. Maybe make sure the proper gdk-pixbuf plugin in installed.
Wow, you're right. Maybe I had a typo in the config when I was trying that out. But now that I try it I can see that the output is very pixelated when I provide a svg file.
We should already support SVG via gdk-pixbuf. Maybe make sure the proper gdk-pixbuf plugin in installed.
Huh, I did not expect that gdk_pixbuf provided svg rendering...
We probably need to use gdk_pixbuf_new_from_file_at_scale
with target dimensions for it to work well though.
But now that I try it I can see that the output is very pixelated when I provide a svg file.
Open the svg file in a text editor. There should be width and height attributes on the svg tag at the top - try to set those to your maximum resolution and see if that does the trick.
But now that I try it I can see that the output is very pixelated when I provide a svg file.
Open the svg file in a text editor. There should be width and height attributes on the svg tag at the top - try to set those to your maximum resolution and see if that does the trick.
That actually did the trick. Thanks!
It would be nice if swaylock supported vector graphics (svg files). My background.svg is 50 KiB, but since swaylock does not support svg files I need to convert it to a 7680×4320 pixel png file which takes up 335 KiB of space and also takes quite long to load in swaylock.