.svg to .eps bad conversion

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Binome

.svg to .eps bad conversion

Post by Binome »

Hi,
I'm using the following command 'convert file.svg file.eps' to convert an svg image to an eps one. The svg contains shaded color boxes and the conversion gives black boxes.
I'm on Kubuntu 9.10.
Does someone know what I can do?
Thank you.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

Post a URL to your SVG image. We need to reproduce the problem before we can reproduce it.
Binome

Re: .svg to .eps bad conversion

Post by Binome »

Sorry, it's here: http://dl.free.fr/ecqe2wlPM
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

Your file converted without any problems. We're using ImageMagick 6.5.7-4 and convert -list format returns:
  • SVG SVG rw+ Scalable Vector Graphics (RSVG 2.26.0)
Binome

Re: .svg to .eps bad conversion

Post by Binome »

I tried to convert to .eps, .ps, .gif, .jpg and .png but I get black boxes anyway.
A friend is converting well on Debian with version 6.5.5-3, I have 6.5.1-0 (it's the distribution version and I got errors when trying to install from source and converting the .rpm to .deb binaries).
Binome

Re: .svg to .eps bad conversion

Post by Binome »

If I try 'display arch-dwt-hard.svg' I get the black boxes. 'gimp arch-dwt-hard.svg' shows the colored boxes.
So I suppose this version of ImageMagick is not able to handle that...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

We have confirmed ImageMagick displays your images properly. We suspect your version of ImageMagick does not include the RSVG delegate library. Type
  • identify -list configure
Does it mention RSVG? If not, download and install the librsvg2 and librsvg2 development libraries and then reconfigure / reinstall ImageMagick.
Binome

Re: .svg to .eps bad conversion

Post by Binome »

  • identify -list configure
was not mentioning RSVG.
The package librsvg2-2 was already installed but not the librsvg2-dev one so I installed it. Then I removed and reinstalled ImageMagick but

Code: Select all

identify -list configure
still didn't mention RSVG and I still wasn't able to show the colored boxes using

Code: Select all

display arch-dwt-hard.svg
Another idea?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

When you configure ImageMagick, make sure it lists support for the RSVG delegate library. If not, check config.log and determine why RSVG failed to validate. Fix the problem and reconfigure ImageMagick until it validates the RSVG delegate library. Now rebuild / reinstall.
Binome

Re: .svg to .eps bad conversion

Post by Binome »

OK, I start from the sources of 6.5.7-4. The './configure' goes well, it tells me it's ok for rsvg, the 'make' and 'make install' seem ok too. But when I try to run the 'display' command (or any other) there's an error:
  • display: symbol lookup error: display: undefined symbol: MagickCommandGenesis
What should I do now?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

It looks like the display program is new and it is dynamically linking to a older version of the ImageMagick library. Delete all versions of ImageMagick on your system and then reinstall. Check the dynamic linking with the ldd command (e.g. ldd /usr/local/bin/display). Try running the display program again and see if that fixes the problem.
Binome

Re: .svg to .eps bad conversion

Post by Binome »

Here is what
  • ldd /usr/local/bin/display
gives after complete removal and reinstallation:
linux-gate.so.1 => (0x00110000)
libMagickCore.so.2 => /usr/lib/libMagickCore.so.2 (0x006a8000)
libMagickWand.so.2 => /usr/lib/libMagickWand.so.2 (0x00dc2000)
liblcms.so.1 => /usr/lib/liblcms.so.1 (0x00111000)
libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00ee5000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00436000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00145000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x001c4000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00c69000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00a0f000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00c14000)
libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x001e8000)
libz.so.1 => /lib/libz.so.1 (0x00fa8000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x001fa000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00585000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00937000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00597000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00213000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x0022e000)
libgomp.so.1 => /usr/lib/libgomp.so.1 (0x0035d000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x003d2000)
/lib/ld-linux.so.2 (0x00686000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00bb7000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00a4a000)
libuuid.so.1 => /lib/libuuid.so.1 (0x0036b000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00370000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x0038e000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00397000)
  • display
is still giving the same error.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

Try ldd on the svg.so coder module:
  • ldd /usr/local//lib/ImageMagick-6.5.7/modules-Q16//coders//svg.so
We get
  • librsvg-2.so.2 => /usr/lib64/librsvg-2.so.2 (0x00007f35c7cde000)
If you do not see a dependency for RSVG-2, see config.log for the reason why.
Binome

Re: .svg to .eps bad conversion

Post by Binome »

Yes, I get this line.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg to .eps bad conversion

Post by magick »

Your ldd of the display program returns /usr/lib/libMagickCore.so.2. Is libMagickCore also installed in /usr/local/lib? Otherwise add -debug configure all to your command line to see where ImageMagick is picking up svg.so. If it picks up the version that includes support for RSVG, we can see no reason why the conversion does not work. It certainly works for us.
Post Reply