I am on a Mac using Mac OS X 10.5, and I am trying to use ImageMagick to convert an SVG file to a PNG. The problem is when I use it the rotated image doesn't show up in the correct position. If I use Batik to convert the file, it works properly.
After doing some research I found a thread that talked about trying to upgrade the SVG library. Currently, I am using ImageMagick 6.6.5 and the SVG library is 2.7.7 according to "identify -list format". The thread I found recommended using librsvg 2.32.
I have tried using port to install the updated SVG library and using port to reinstall ImageMagick. The problem and the question I have is no matter what I do with port I can't get it to use the newer version of the SVG library. It stays at 2.7.7. How do I get it to use the new library?
Unfortunately, I went down this path for a while too. After a very long time beating my head against the wall and getting fairly bruised in the process, I found the only thing that worked was inkscape
. Everything else just doesn't pull it off. Unfortunately, inkscape
's CLI interfaces aren't great and don't offer you nearly as much flexibility as you'd like (especially when converting to PDFs, etc), it does at least work better than everything else. To use it:
inkscape -f INPUT.SVG -e OUTPUT.PNG
See inkscape --help
for aditional details.
Extra word of warning: inkscape -h
actually doesn't do what you want for help and launches the GUI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With