Page 1 of 2
svg to png errors
Posted: 2008-07-08T15:25:29-07:00
by landon.silla
I just installed IM with:
Code: Select all
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd ImageMagick-6.4.2/
./configure
make
sudo make install
Then i tried to convert something and i got errors:
Code: Select all
convert input.svg out.png
sh: wmf2eps: not found.
convert: Delegate failed `"wmf2eps" -o "%o" "%i"'.
convert: unable to open image `/tmp/magick-a0009855': No such file or directory.
convert: unable to load module `/usr/local/lib/ImageMagick-6.3.9/modules-Q16/coders/svg.la': can't open the module.
convert: unable to open file `/tmp/magick-a0009855': No such file or directory.
convert: missing an image filename `/tmp/tst.eps'.
Then i found some posts that said wmf2eps should be used and libwmf should be installed, so i installed it and now when i try to convert, i get:
Code: Select all
convert mrv_basemap.svg out.png
ERROR: meta.c (179): wmf_header_read: this isn't a wmf file
convert: Delegate failed `"wmf2eps" -o "%o" "%i"'.
convert: unable to open image `/tmp/magick-XXvUDrlv': No such file or directory.
convert: unable to open file `/tmp/magick-XXvUDrlv': No such file or directory.
convert: missing an image filename `out.png'.
can somebody please advise what i need to do to be able to convert from svg to png from the command line?
thanks guys!
Re: svg to png errors
Posted: 2008-07-09T16:37:33-07:00
by landon.silla
is anybody here on this forum? hello?
Re: svg to png errors
Posted: 2008-07-09T17:24:59-07:00
by fmw42
looks like you need to install all the delegate libraries for png, jpg, freetype, gs, tif etc
http://www.imagemagick.org/download/delegates/
http://www.imagemagick.org/script/advan ... lation.php
Type the following:
convert -list configure
and see what the line that starts with DELEGATES says. It should list all the delegates installed that IM knows about. Mine says:
DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib
Re: svg to png errors
Posted: 2008-07-10T13:02:30-07:00
by tsdineen
You say you want to convert svg to png, but the delegates is using wmf2eps. The wmf format is entirely different. Are you sure the input.svg is a svg file? If it is, I would say you might be picking up another install of IM.
Re: svg to png errors
Posted: 2009-11-25T05:32:43-07:00
by petercoloney
hi,
i want to convert .svg image to .png is it possible to convert svg image to image....
if so let me know the process.... i'm using imagemagick 6.5.4 version.
Re: svg to png errors
Posted: 2009-12-22T17:52:53-07:00
by shabbychef
I am also getting this bug; I just uninstalled, then reinstalled imageMagick-6.5.2.9 on an amd64 machine under gentoo; I get the following:
Code: Select all
$ file tp9a33b48e_32e9_4391_8996_3f5e4ddcd96b.svg
tp9a33b48e_32e9_4391_8996_3f5e4ddcd96b.svg: SVG Scalable Vector Graphics image
$ convert svg:tp9a33b48e_32e9_4391_8996_3f5e4ddcd96b.svg outfile.png
ERROR: meta.c (179): wmf_header_read: this isn't a wmf file
convert: Delegate failed `"wmf2eps" -o "%o" "%i"' @ delegate.c/InvokeDelegate/1032.
convert: unable to open image `/tmp/magick-XX4DVfpA': No such file or directory @ blob.c/OpenBlob/2489.
convert: unable to open file `/tmp/magick-XX4DVfpA': No such file or directory @ constitute.c/ReadImage/542.
convert: missing an image filename `outfile.png' @ convert.c/ConvertImageCommand/2776.
looking at the delegates:
Code: Select all
$ convert -list configure | grep DELEGATES
DELEGATES bzlib djvu gs gvc jpeg jng png rsvg tiff x11 zlib
I assume that 'rsvg' means 'svg' is supported ('delegated'). I have libwmf-0.2.8.4-r3, but it was not compiled with expat support (XML parsing). could that be the issue? I'm not sure why wmf is being invoked for a svg file, tho...
Re: svg to png errors
Posted: 2009-12-22T18:39:19-07:00
by fmw42
I am no expert on installation. But when you run ./configure does that show in the listing the following three lines?
PNG --with-png=yes yes
RSVG --with-rsvg=yes yes
WMF --with-wmf=yes yes
If not, you may want to add those --with... statements to your config command:
-- with-png --with-rsvg --with-wmf
If that does not help, then wait for one of the IM experts to reply.
Re: svg to png errors
Posted: 2009-12-24T04:20:27-07:00
by krikrizzz
Hello, i have a problem with conversion with svg to png too.
a segment fault :
/usr/bin/convert -background none -geometry 120 '/var/www/html/file.svg' '/var/www/html/ddco/images/thumb/file.svg/file.svg.png'
Erreur de segmentation
my delegates is ok :
convert -list configure
Path: /usr/local/lib/ImageMagick-6.5.8/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -W -pthread
CONFIGURE ./configure
COPYRIGHT Copyright (C) 1999-2010 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib fontconfig freetype jpeg jng lcms png rsvg tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath=
EXEC-PREFIX /usr/local
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x658
LIB_VERSION_NUMBER 6,5,8,7
LIBS -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2009-12-24
VERSION 6.5.8
WEBSITE
http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
can you help me please ?
thank you
Re: svg to png errors
Posted: 2010-01-05T12:10:14-07:00
by shabbychef
upgrading to imageMagick-6.5.7.0 on Gentoo does not solve the problem for me:
Code: Select all
$ convert svg:tp0008f031_64f1_4e55_8fe9_1e69d713bebc.svg outfile.png
ERROR: meta.c (179): wmf_header_read: this isn't a wmf file
convert: Delegate failed `"wmf2eps" -o "%o" "%i"' @ delegate.c/InvokeDelegate/1032.
convert: unable to open image `/tmp/magick-XX1fYRx2': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/magick-XX1fYRx2': No such file or directory @ constitute.c/ReadImage/542.
convert: missing an image filename `outfile.png' @ convert.c/ConvertImageCommand/2822.
Re: svg to png errors
Posted: 2010-01-06T08:14:38-07:00
by magick
The 'convert -list configure' command must show that rsvg is associated with the DELEGATES tag. If not, when you build ImageMagick, after you run the configure script, check the last 50 lines or so of output and ensure the RSVG delegate library was validated. If not, see config.log to determine why it was not, fix the problem, and rerun the configure script until the RSVG delegate library is validated. Now rebuild / reinstall ImageMagick. That should permit convert to read SVG images.
Re: svg to png errors
Posted: 2010-01-06T19:48:30-07:00
by shabbychef
hmmm, seems ok:
Code: Select all
$ convert -list configure | grep DELEGATES
DELEGATES bzlib djvu gs gvc jpeg jng lqr mpeg png rsvg tiff x11 zlib
I am guessing this is what you mean by 'associated' with DELEGATES
Re: svg to png errors
Posted: 2010-01-06T19:59:49-07:00
by magick
Can you post a URL to your SVG image file so we can download it and see if we can reproduce the problem?
Add -debug coder to your command line and see what the debugging info tells you. Post the output here.
Re: svg to png errors
Posted: 2010-10-12T11:49:11-07:00
by dognose
Code: Select all
#convert rose: rose.svg
Segmentation fault
convert rose.svg rose.png
Segmentation fault
The resulting image looks correct.
convert --version
Version: ImageMagick 6.6.1-10 2010-05-23 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg png rsvg tiff x11 xml wmf zlib
Re: svg to png errors
Posted: 2010-10-12T11:59:52-07:00
by magick
Does the problem persist with the latest release of ImageMagick 6.6.4-10? If so, try building without OpenMP support. Add --disable-openmp to your configure script command line. Now build and install. Does the fault still occur?
Re: svg to png errors
Posted: 2010-10-13T12:17:28-07:00
by dognose
doesn't fix it. the problem is still there:
Code: Select all
# convert --version
Version: ImageMagick 6.6.4-10 2010-10-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:
# convert rose: rose.svg
Segmentation fault