Convert SVG to JPG in Windows produces blank JPG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 10701
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert SVG to JPG in Windows produces blank JPG

Post by snibgo » 2018-01-05T12:31:38-07:00

kndti wrote:I just want to be clear here, Hasniou's situation is different from mine.
Sorry, my confusion.

I don't know why your installation of IM can't run Inkscape. What happens with "-debug all", eg:

Code: Select all

convert -debug all in.svg out.jpg
What does that say about trying to run Inkscape?
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 23846
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert SVG to JPG in Windows produces blank JPG

Post by fmw42 » 2018-01-05T12:34:28-07:00

Is it possible that Inkscape is not in the same PATH as Imagemagick, so it cannot find it? Sorry, I do not know much about Windows environments.

kndti
Posts: 14
Joined: 2017-12-27T07:51:33-07:00
Authentication code: 1152

Re: Convert SVG to JPG in Windows produces blank JPG

Post by kndti » 2018-01-08T06:55:22-07:00

-debug all produces a mess of feedback, none of which mentions Inkscape

Inkscape is installed to its own directory, but it executes properly from the ImageMagick directory.

snibgo
Posts: 10701
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert SVG to JPG in Windows produces blank JPG

Post by snibgo » 2018-01-08T07:03:27-07:00

kndti wrote:-debug all produces a mess of feedback, none of which mentions Inkscape
Then it isn't even trying to run Inkscape.

What does delegates.xml have about Inkscape? If it has nothing, try adding a line:

Code: Select all

  <delegate decode="svg:decode" stealth="True" command="&quot;inkscape&quot; &quot;%s&quot; --export-png=&quot;%s&quot; --export-dpi=&quot;%s&quot; --export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1"/>
snibgo's IM pages: im.snibgo.com

kndti
Posts: 14
Joined: 2017-12-27T07:51:33-07:00
Authentication code: 1152

Re: Convert SVG to JPG in Windows produces blank JPG

Post by kndti » 2018-01-08T07:58:48-07:00

Well this is interesting.. in my delegates file, there's this:
<!-- Remove the extra space in - -export in the line below when you want to use inkscape -->
<!--<delegate decode="svg:decode" stealth="True" command="&quot;inkscape&quot; &quot;%s&quot; - -export-eps=&quot;%s&quot; - -export-dpi=&quot;%s&quot; - -export-background=&quot;%s&quot; - -export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1"/>-->
Which isn't exactly the line you've posted, since this one is exporting EPS, not PNG. But after removing the extra space and un-commenting the line, it has no effect. I also tried pasting your line into my delegates file, and nothing is changing. Magick is still using RSVG and not Inkscape.

kndti
Posts: 14
Joined: 2017-12-27T07:51:33-07:00
Authentication code: 1152

Re: Convert SVG to JPG in Windows produces blank JPG

Post by kndti » 2018-01-10T07:47:27-07:00

Is there something special I need to do to make Inkscape work with ImageMagick?

erickem
Posts: 3
Joined: 2018-02-02T00:55:57-07:00
Authentication code: 1152

Re: Convert SVG to JPG in Windows produces blank JPG

Post by erickem » 2018-02-06T01:03:04-07:00

Try using Inkscape directly.

_________
my website: thêu chân mày Ngọc Dung
Last edited by erickem on 2018-04-09T01:22:01-07:00, edited 2 times in total.

kndti
Posts: 14
Joined: 2017-12-27T07:51:33-07:00
Authentication code: 1152

Re: Convert SVG to JPG in Windows produces blank JPG

Post by kndti » 2018-02-06T06:39:04-07:00

Inkscape does not convert directly from SVG to JPG.

Post Reply