Page 1 of 1

SVG broken in ImageMagick 6.8.4-10

Posted: 2013-04-23T05:35:05-07:00
by rurider
Hello,

i found possible bug in ImageMagick-6.8.4-10:

Code: Select all

$ convert ~/nx-desktop.svg ~/a.png
convert: unable to open image `#XMLID_36_': No such file or directory @ error/blob.c/OpenBlob/2641.
convert: no decode delegate for this image format `#XMLID_36_' @ error/constitute.c/ReadImage/550.
nx-desktop.svg file is available here:
http://git.altlinux.org/people/boris/pa ... 0c2c633415

this problem is reproduced on all the svg files that contain the href or url with the key '#'

Re: SVG broken in ImageMagick 6.8.4-10

Posted: 2013-04-23T05:48:19-07:00
by magick
Do you have Inkscape installed? If so,
  • convert -verbose opennx_extres_scalable_mimetypes_nx-desktop.svg test.png
should return correct results and this output:
  • -> convert -verbose opennx_extres_scalable_mimetypes_nx-desktop.svg test.png
    "inkscape" "opennx_extres_scalable_mimetypes_nx-desktop.svg" --export-png="/tmp/magick-27786rJQDudTIjhMe" --export-dpi="90,90" --export-background="rgb(100%,100%,100%)" --export-background-opacity="1" > "/tmp/magick-27786QPzpCynubiQF" 2>&1
    /tmp/magick-27786rJQDudTIjhMe PNG 60x60 60x60+0+0 8-bit sRGB 5.16KB 0.000u 0:00.000
    opennx_extres_scalable_mimetypes_nx-desktop.svg=>/tmp/magick-27786rJQDudTIjhMe SVG 60x60 60x60+0+0 8-bit sRGB 5.16KB 0.000u 0:00.000
    opennx_extres_scalable_mimetypes_nx-desktop.svg=>test.png SVG 60x60 60x60+0+0 8-bit sRGB 5.3KB 0.000u 0:00.000

Re: SVG broken in ImageMagick 6.8.4-10

Posted: 2013-04-23T05:59:23-07:00
by rurider
No. inkscape on my system is not installed and I would do without it, if possible.
I see a typo in configure for the new version:
- --without-rsvg disable RSVG support
+ --without-rsvg enable RSVG support

it would be correct:
- --without-rsvg disable RSVG support
+ --with-rsvg enable RSVG support

if I'm build with rsvg support - it will help me?
I would not want to put ImageMagick dependent on inkscape - it brings some problems for server configurations with libImageMagick installed.

Re: SVG broken in ImageMagick 6.8.4-10

Posted: 2013-04-23T06:24:13-07:00
by magick
If inkscape or RSVG is not installed, ImageMagick reverts to the internal renderer which does not support the entire SVG specification as you have seen.

Re: SVG broken in ImageMagick 6.8.4-10

Posted: 2013-04-23T06:35:27-07:00
by rurider
Ok. please, apply this patch - he corrects typo:
diff --git a/ImageMagick/configure b/ImageMagick/configure
index f4873e9..45fd6fb 100755
--- a/ImageMagick/configure
+++ b/ImageMagick/configure
@@ -1938,7 +1938,7 @@ Optional Packages:
--without-openexr disable OpenEXR support
--without-pango disable PANGO support
--without-png disable PNG support
- --without-rsvg enable RSVG support
+ --with-rsvg enable RSVG support
--without-tiff disable TIFF support
--without-webp disable WEBP support
--with-windows-font-dir=DIR
diff --git a/ImageMagick/configure.ac b/ImageMagick/configure.ac
index 0312d53..5f652e6 100755
--- a/ImageMagick/configure.ac
+++ b/ImageMagick/configure.ac
@@ -2663,7 +2663,7 @@ dnl ===========================================================================
# Check for RSVG delegate library.
#
AC_ARG_WITH([rsvg],
- [AC_HELP_STRING([--without-rsvg],
+ [AC_HELP_STRING([--with-rsvg],
[enable RSVG support])],
[with_rsvg=$withval],
[with_rsvg='no'])