Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  22] [ 0]  / answers: 1 / hits: 16359  / 3 Years ago, wed, september 8, 2021, 11:28:22

I have these SVGS and I'd like to export them to PNG images, I could export them with Inkscape but that would mean open each file and export that file to PNG which is not efficient (I have hundreds of them).



How can I do this?


More From » convert

 Answers
0

Inspired by the previously accepted answer I came up with this one-liner:


For Inkscape version 0.92.4 and earlier:


for file in *.svg; do inkscape "$file" -e "${file%svg}png"; done

This way you don't need to call a script. If you wanted to, you could create an alias for converting all svgs in the current directory to pngs:


alias svgtopng='for file in *.svg; do inkscape "$file" -e "${file%svg}png"; done'

For Inkscape version 1.0 Beta and later:


for file in *.svg; do inkscape "$file" -o "${file%svg}png"; done

This way you don't need to call a script. If you wanted to, you could create an alias for converting all svgs in the current directory to pngs:


alias svgtopng='for file in *.svg; do inkscape "$file" -o "${file%svg}png"; done'

[#34602] Friday, September 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fectlyole

Total Points: 64
Total Questions: 110
Total Answers: 110

Location: Nicaragua
Member since Thu, Feb 3, 2022
2 Years ago
fectlyole questions
Sun, May 8, 22, 02:54, 2 Years ago
Mon, Jun 21, 21, 16:56, 3 Years ago
Fri, Jul 9, 21, 17:44, 3 Years ago
;