How convert all SVG files in directory to PNG?

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?".
Post Reply
belyan

How convert all SVG files in directory to PNG?

Post by belyan »

How convert all SVG files in directory to PNG with save original file names?
a.svg
b.svg
c.svg
...

Command

Code: Select all

convert *.svg *.png
rewrite original file names.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How convert all SVG files in directory to PNG?

Post by fmw42 »

use mogrify

see http://www.imagemagick.org/Usage/basics/#mogrify

mogrify -format png *.svg

but better to create a second directory and have the new files put there

cd /fullpathto/svgdirectory
mogrify -path /fullpathto/pngdirectory -format png *.svg
belyan

Re: How convert all SVG files in directory to PNG?

Post by belyan »

Thanks.
Post Reply