Thanks, @Billy Kerr!
I saw the posts on StackOverflow (first and second) and figured out I'll need to use
First, convert PNG files to BMP, because
potrace can work only with BMP. It is possible to do using an online site, but it's easier and always free offline.
To process multiple files using
potrace, a bash script is needed:
for filename in ./*.bmp; do
for ((i=0; i<=3; i++)); do
potrace --svg $filename
The script iterates through all the elements of the current directory and converts them all to SVG using
But to use it in the terminal, first make it executable by writing
chmod +x [your filename].sh
and then run it:
After that, the terminal will work a bit, so don't worry, the images are processing - approximately half of a second per image.