0

Here is an SVG image I want to convert to PNG with librsvg in my program.

This is a PNG version of the SVG exported from Inkscape:

enter image description here

This is a bitmap of the same SVG exported with librsvg:

enter image description here

Only the white portions of the image are exported. The black portions, despite being well-defined in the background, appear transparent.

This problem occurs whether I use the librsvg API or the program rsvg-convert. You can use the W3 validator to see that the SVG's markup is valid.

I notice the same thing happens in the thumbnails of the SVGs in my file browser. Perhaps they're using librsvg?

EMBLEM
  • 2,207
  • 4
  • 24
  • 32

1 Answers1

0

Upon digging into the files I discovered that, for some reason, the fill of the black portion was set to "fill:currentColor". I don't know where that came from, but changing it to "fill:#000000" fixed the problem.

EMBLEM
  • 2,207
  • 4
  • 24
  • 32