6

Is there any software that would help me convert a large amount of small SVG files to PNG?

It would be great if it would let me specify the color to use for any solid paths in the SVG files.

3 Answers 3

6

That should be possible using ImageMagick, which is available cross-platform (Linux, Mac, Windows). This software ships with a bunch of command-line utilities, perfectly fitting your needs.

Let's give me an example: Say you've stored a bunch of your *.svg in the current directory, and want to convert them to *.png – that would be a one-liner:

convert -format png *.svg

A more detailed description can be found with the ImageMagick examples, or a simple Google-search for "imagemagick convert svg to png". As I've not used ImageMagick in this manner, I cannot give you the exact parameters for your "color issue" – but I'd wonder if that wouldn't be possible.

7

You can use Inkscape (gratis, available on Linux, Mac, Windows). It has some export command line options, e.g. inkscape in.svg --export-type=png -o out.png -h HEIGHT -w WIDTH .

2
  • In case you prefer the dpi setting: inkscape in.svg --export-type=png -o out.png --export-dpi=DPI
    – LC117
    Commented Dec 13, 2023 at 10:57
  • I didn't know Inkscape has a CLI, wonderful! I used inkscape --export-type=png *.svg to convert all SVG files in the current folder. The default is 96 dpi, which was fine for me.
    – msa
    Commented Mar 16 at 14:30
1

You can use Photoshop CC 2015 or higher:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.