Page 1 of 1
Does librsvg support the <image> element?
Posted: 2017-03-28T09:09:42-07:00
by aharper
We have a product that dates back to 2005 or earlier that uses librsvg. It seems that whatever version of librsvg we currently use does not support the "image" element. See sample of image element form a real SVG message below.
Should librsvg support this capability, and if so in what version. The hr = m_RenderSVGDocument() method fails on the element shown below. However it does return a successful hr if the href is pointing to a local graphics file, but the mage in the file is not rendered in the final output.
Also, should this element support locally stored graphics files ( png, bmp, jpg, etc ) in the href attribute?
<image x='2mm' y='10mm' width='25mm' height='55mm' xlink:href='
http://epaxbeta.lanchile.cl/cusskiosk/d ... umnCount=6'/><!-- Left part -->
Any help appreciated.
Al Harper
Re: Does librsvg support the <image> element?
Posted: 2017-03-28T16:03:51-07:00
by fmw42
Would be best if you provide your IM version and platform? And an example of the command line you used. I do not know much about SVG files. Are you following the SVG standards in your SVG file? Perhaps show the whole SVG file, so others can test.
What do you get from
for SVG. It should tell you the version of RSVG used.
Likewise,
will identify the IM version.
Re: Does librsvg support the <image> element?
Posted: 2017-03-28T17:24:20-07:00
by snibgo
This is an ImageMagick forum, not a librsvg forum. Questions about the capabilities of libsrvg, and what it should support, might get a better response if directed to libsrvg maintainers.
However, ImageMagick does use libsrvg as an internal delegate. A simple test, with an SVG file with "<image xlink:href="r.jpg>"", where r.jpg is a local file, converts as expected using RSVG. (It also converts correctly with MSVG.)
Tested with IM 6.9.5-3 RSVG 2.40.15.
Re: Does librsvg support the <image> element?
Posted: 2017-04-03T14:17:17-07:00
by aharper
I'm desperately trying to find the librsvg maintainers. Imagemagick is the closest website I've come to that seems to have any decent content about librsvg. I guess I will search elswhere.
Al
Re: Does librsvg support the <image> element?
Posted: 2017-04-03T14:55:35-07:00
by snibgo
Sorry, I don't know internals of rsvg. Someone else might.
RSVG (and MSVG) correctly render this SVG file, which links to a local JPG and an http JPG:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="750px"
height="1100px"
id="svg2"
version="1.1"
>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<image
xlink:href="r.jpg"
width="70"
height="46"
preserveAspectRatio="none"
id="image4143"
x="365.84741"
y="666.83051" />
<image
y="117.79662"
x="80.508469"
id="image4154"
xlink:href="http://im.snibgo.com/invcomp_trailer.jpg"
preserveAspectRatio="none"
height="100"
width="100" />
</svg>