ImageMagick (RSVG) won't import images in SVG

佐手、 提交于 2019-12-01 04:57:41

For me, installing gtk3 (or probably more specifically "shared-mime-info" helped. (and re-installing rsvg afterwards AND using absolute "file:///" uri for href AND having image file in same directory as svg file)

More info (I'm still confused what exactly is going on):

  • I think the problem is not with rsvg directly, but with gdk-pixbuf(2) library

  • I found the place in the code where gdk-pixbuf is used to load the image. I confirmed (using printf debuggin) that it doesn't throw an error (seems to load pixbuf just fine) even if the uri in the href does not point to a file.

  • the gtk3 dependency should only be necessary for rsvg-view-3 tool, not for rsvg, but it seems to be (or one of the dependencies that got pulled in when I installed gtk3)

  • It still works even after uninstalling gtk3. It even still works after uninstalling gtk3, then rebuilding rsvg (./configure detects: "gtk3: no"), so I figure it must have to do with one of the dependencies that got pulled when I installed gtk3:

  • atk-2.10.0-1-i686

  • hicolor-icon-theme-0.12-2-any
  • gtk-update-icon-cache-2.24.22-1-i686
  • libtasn1-3.3-2-i686
  • p11-kit-0.20.1-1-i686
  • gnutls-3.2.5-1-i686
  • libcups-1.7.0-1-i686
  • libxinerama-1.1.3-2-i686
  • shared-mime-info-1.2-1-i686
  • libgusb-0.1.6-1-i686
  • nspr-4.10.1-2-i686
  • js-17.0.0-1-i686
  • polkit-0.112-1-i686
  • shared-color-profiles-0.1.5-1-any
  • dconf-0.18.0-1-i686
  • colord-1.0.2-2-i686
  • recordproto-1.14.2-1-any
  • libxtst-1.2.2-1-i686
  • at-spi2-core-2.10.1-1-i686
  • at-spi2-atk-2.10.0-1-i686
  • xkeyboard-config-2.10.1-1-any
  • libxkbcommon-0.3.1-1-i686

(I'm leaving these here in case it's not the lib I identified in the end)

So I tried removing these deps in groups and rebuilding and testing in between. Turns out the one making it work is...

* shared-mime-info

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!