librsvg ERROR "Unrecognized image file format"
Posted: 2017-05-31T14:46:23-07:00
I'm using librsvg to process SVG messages and render the images. In short almost everything is working good except for one single element.
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/sv ... 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
Code: Select all
<image x="2mm" y="10mm" width="25mm" height="55mm" xlink:href="http://epaxbeta.lanchile.cl/cusskiosk/dynamicQueries.do?actionName=barcode&logStream=M1SALDARRIAGA%2FCARLOS+DEZWTLSO+LIMCUZLA+7934+151Y029J0002+33D%26lt%3B10B1KR7150BLA+29045++++++++00+++LA+51428605989+++++++++3+&orientation=90&moduleWitdh=0.4&resolution=300&columnCount=6"/>
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/sv ... 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