Mobile app version of vmapp.org
Login or Join
BetL875

: That would be a job for the command line tool Image Magick mogrify. The following command: mogrify -resize '4000x4000' -format png *.svg Will convert all SVG files in the current folder to

@BetL875

That would be a job for the command line tool Image Magick mogrify. The following command:

mogrify -resize '4000x4000' -format png *.svg


Will convert all SVG files in the current folder to PNG keeping the aspect ratio but with the largest side exactly 4000 pixels.

In case we had defined a non-transparent white (or any other color) background in the source SVG we can add transparency with:

mogrify -resize '4000x4000' -transparent white -format png *.svg




Note on Windows command line:
We need to prefix the commands with magick and should not use ticks ' but nothing, or quote marks " instead.

An example Windows command may look like this:

magick mogrify -resize "4000x4000" -transparent white -format png *.svg




Converting EPS files need a density value (in DPI) in addition:

magick mogrify -resize "4000x4000" -density 300 -transparent white -format png *.eps

10% popularity Vote Up Vote Down


Login to follow query

More posts by @BetL875

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme