librsvg returns error = "Unrecognized image file format"

Al Harper <[email protected]> Wed, 31 May 2017 11:37:23 -0500
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <CADTzHRvOLxS-FFvNiPeNmk6ksJqA919Qbp1OyyNc0_X3HjO_UA@mail.gmail.com>
--===============8598827763989153021==
Content-Type: multipart/alternative; boundary="94eb2c0d2aa8ecc7220550d4889b"

--94eb2c0d2aa8ecc7220550d4889b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I'm using librsvg to process SVG messages and render the images. In short
almost everything is working good except for one single element.

<image x=3D"2mm" y=3D"10mm" width=3D"25mm" height=3D"55mm" xlink:href=3D"
http://epaxbeta.lanchile.cl/cusskiosk/dynamicQueries.do?actionName=3Dbarcod=
e&amp;logStream=3DM1SALDARRIAGA%2FCARLOS+DEZWTLSO+LIMCUZLA+7934+151Y029J000=
2+33D%26lt%3B10B1KR7150BLA+29045++++++++00+++LA+51428605989+++++++++3+&amp;=
orientation=3D90&amp;moduleWitdh=3D0.4&amp;resolution=3D300&amp;columnCount=
=3D6
"/>

If I run my application in a debugger and step through librsvg I find the
routine(s) responsible for rending the image at this URL are:

gdk_pixbuf_loader_new_with_mime_type (mime_type, error); and
gdk_pixbuf_loader_new_with_mime_type (const char *mime_type, GError **error=
)

The routine gdk_pixbuf_loader_new_with_mime_type is failing because it is
unable to determine the image type at the URL. It's returning error
"Unrecognized image file format"

The way the librsvg code is written it would appear the image type should
somehow be indicated/imbedded in the element. Well it's not. I believe
librsvg should be able to figure this out somehow in it's URL/image
processing.

I can paste the entire SVG message into a web site:
http://www.rapidtables.com/web/tools/svg-viewer-editor.htm It is able to
completely and accurately render all elements of the message, including
this one image elements. (It's a barcode).

Can anyone enlighten me as to what to do. I know librsvg is an ongoing
supported project under Gnome. Has this problem been fixed? Any help is
much appreciated.

Al Harper

--94eb2c0d2aa8ecc7220550d4889b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;m using librsvg to process SVG messages and render t=
he images. In short almost everything is working good except for one single=
 element.<br><br>&lt;image x=3D&quot;2mm&quot; y=3D&quot;10mm&quot; width=
=3D&quot;25mm&quot; height=3D&quot;55mm&quot; xlink:href=3D&quot;<a href=3D=
"http://epaxbeta.lanchile.cl/cusskiosk/dynamicQueries.do?actionName=3Dbarco=
de&amp;amp;logStream=3DM1SALDARRIAGA%2FCARLOS+DEZWTLSO+LIMCUZLA+7934+151Y02=
9J0002+33D%26lt%3B10B1KR7150BLA+29045++++++++00+++LA+51428605989+++++++++3+=
&amp;amp;orientation=3D90&amp;amp;moduleWitdh=3D0.4&amp;amp;resolution=3D30=
0&amp;amp;columnCount=3D6">http://epaxbeta.lanchile.cl/cusskiosk/dynamicQue=
ries.do?actionName=3Dbarcode&amp;amp;logStream=3DM1SALDARRIAGA%2FCARLOS+DEZ=
WTLSO+LIMCUZLA+7934+151Y029J0002+33D%26lt%3B10B1KR7150BLA+29045++++++++00++=
+LA+51428605989+++++++++3+&amp;amp;orientation=3D90&amp;amp;moduleWitdh=3D0=
.4&amp;amp;resolution=3D300&amp;amp;columnCount=3D6</a>&quot;/&gt;<br><br>I=
f I run my application in a debugger and step through librsvg I find the ro=
utine(s) responsible for rending the image at this URL are:<br><br>gdk_pixb=
uf_loader_new_with_mime_type (mime_type, error); and gdk_pixbuf_loader_new_=
with_mime_type (const char *mime_type, GError **error)<br><br>The routine g=
dk_pixbuf_loader_new_with_mime_type is failing because it is unable to dete=
rmine the image type at the URL. It&#39;s returning error &quot;Unrecognize=
d image file format&quot;<br><br>The way the librsvg code is written it wou=
ld appear the image type should somehow be indicated/imbedded in the elemen=
t. Well it&#39;s not. I believe librsvg should be able to figure this out s=
omehow in it&#39;s URL/image processing.<br><br>I can paste the entire SVG =
message into a web site: <a href=3D"http://www.rapidtables.com/web/tools/sv=
g-viewer-editor.htm">http://www.rapidtables.com/web/tools/svg-viewer-editor=
.htm</a> It is able to completely and accurately render all elements of the=
 message, including this one image elements. (It&#39;s a barcode).<br><br>C=
an anyone enlighten me as to what to do. I know librsvg is an ongoing suppo=
rted project under Gnome. Has this problem been fixed? Any help is much app=
reciated.<br><br>Al Harper<br></div>

--94eb2c0d2aa8ecc7220550d4889b--


--===============8598827763989153021==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============8598827763989153021==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Librsvg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsvg-devel

--===============8598827763989153021==--