SVG image conversion appears to be missing support for several SVG elements/attributes


I just tried using the Aspose.Imaging library (using the latest v. to convert an SVG graphic into a PNG and/or BMP, and found that a handful of supported SVG elements and attributes got lost during the conversions:

  1. rgba() “fill” colors were always converting as black (i.e. the alpha channel didn’t work) even though svg supports the use of rgba colors (tried in both PATH and RECT elements).

  2. As expected, the SYMBOL element (often used for icons in svg graphics) doesn’t get rendered in an svg, nor is it required to be under a DEFS element. But a conversion to a png or bmp improperly renders the SYMBOL and thus puts it in the wrong spot.

  3. USE elements don’t render in the converted png/bmp unless the now-deprecated “xlink:href” attribute has been used. If the now-standard “href”-only attribute is used in the svg, the conversion of the USE completely fails.

  4. TEXT elements never get converted when referred to by a USE element. That problem appears to be true whether the TEXT is part of a grouping element in the DEFS or a stand-alone element.

As long as a user has full control over the original SVG markup, they have a chance of finding work-arounds for these issues (e.g. use rgb colors plus the fill-opacity attribute in place of rgba colors), but otherwise these problems are pretty serious.




I have observed the information shared by you and request you to please share the working sample project and example files used on your end. We will be able to investigate the issue further on our end on provision of requested information.