ITADN

Render SVG files at output resolution

#79Pull Requestmstoeckl 创建于 2024-10-26
M
mstoecklcommented
This PR would close https://github.com/swaywm/swaybg/issues/60 . * This adds an additional dependency, which recursively links a few more libraries; this increases startup time by about 10ms. * Opening the SVG file with `rsvg_handle_new_from_file` lets the SVG recursively load linked images (see https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/class.Handle.html#security-and-locations-of-referenced-files ; SVGs can already embed other image types via data-URI, and librsvg blocks web resources entirely.) Should this behavior be disabled? It is possible to render SVG files at higher resolution using _just_ GdkPixbuf, but doing so is somewhat complicated, and appears to always preserve aspect ratio so that scaling/cropping afterwards is still necessary. See branch https://github.com/mstoeckl/swaybg/tree/pixbuf-scale for an example.
合并状态:未合并 0 条评论