Page 1 of 1
Speed up svg -> jpg conversion
Posted: 2019-01-03T11:55:56-07:00
by BigNoub
I'm using Imagemagick 7.0.8-14 on ubuntu 16.04
I'm trying to convert some fairly big (80Mo) svg files to jpg using a simple convert command. The process takes a couple of hours, is there a way to speed that up? I've tried doing the same thing manually with inkscape, it takes a couple of minutes to load the svg file, and a couple of seconds to write it as jpg.
If you know a better option than imagemagick to do this job I'll be happy to use it, as long as it's command-line based.
Edit: I was able to convert under a few seconds using inkscape command line, but if there is a way to speed up the process with Imagemagick too I'm also willing to know it
Re: Speed up svg -> jpg conversion
Posted: 2019-01-03T17:01:05-07:00
by magick
ImageMagick supports 3 different SVG renderers. One of them is inkscape. To find out which ImageMagick utilizes type `magick -list format` and look for SVG. Which renderer are you using?
Can you post a URL to an SVG file that takes a long time to process? If you do, we'll use it to fix the performance issue.
Re: Speed up svg -> jpg conversion
Posted: 2019-01-04T09:43:16-07:00
by BigNoub
I made a mistake, I run ImageMagick 6.9.7-4 on Ubuntu 18.04. I can't really update as it's not my server.
I think I can't run
with this version? I tried
but got
Code: Select all
SVG SVG rw+ Scalable Vector Graphics (XML 2.9.4)
I don't think that's what you're looking for?
Here is an svg you can use for your tests:
https://drive.google.com/file/d/1YJUyP0 ... sp=sharing
running a simple
took me 3 hours and 10 minutes.
Re: Speed up svg -> jpg conversion
Posted: 2019-01-04T11:17:02-07:00
by fmw42
SVG SVG rw+ Scalable Vector Graphics (XML 2.9.4)
This says your are using XML which uses MSVG for the renderer.
Re: Speed up svg -> jpg conversion
Posted: 2019-01-04T16:43:44-07:00
by magick
Your file has 359222 path elements. You want to build ImageMagick with one of the delegate SVG renderers, with RSVG or Inkscape. The internal renderer has performance issues with that many path elements.
Re: Speed up svg -> jpg conversion
Posted: 2019-01-05T09:52:36-07:00
by BigNoub
OK. I couldn't find easily how to specify the renderer in the doc, do I just need to have inkscape installed and in my path?
Re: Speed up svg -> jpg conversion
Posted: 2019-01-05T11:11:39-07:00
by fmw42
BigNoub wrote: ↑2019-01-05T09:52:36-07:00
OK. I couldn't find easily how to specify the renderer in the doc, do I just need to have inkscape installed and in my path?
That should work.
You can find what you have now by
and look at the end of the line for SVG. It will likely be either XML (for the IM internal MSVG) or RSVG delegate