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: 12159
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 »

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: 25562
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 »

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 »

-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: 12159
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 »

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 »

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 »

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 »

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.
sent from my cách làm kem tươi tại nhà using Iphone X
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 »

Inkscape does not convert directly from SVG to JPG.
Post Reply