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
Speed up svg -> jpg conversion
Re: Speed up svg -> jpg conversion
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.
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
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
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.
I think I can't run
Code: Select all
magick -list format
Code: Select all
convert -list format
Code: Select all
SVG SVG rw+ Scalable Vector Graphics (XML 2.9.4)
Here is an svg you can use for your tests:
https://drive.google.com/file/d/1YJUyP0 ... sp=sharing
running a simple
Code: Select all
convert in.svg out.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Speed up svg -> jpg conversion
This says your are using XML which uses MSVG for the renderer.SVG SVG rw+ Scalable Vector Graphics (XML 2.9.4)
Re: Speed up svg -> jpg conversion
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
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?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Speed up svg -> jpg conversion
That should work.
You can find what you have now by
Code: Select all
convert -list format