Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-30-2012, 04:31 AM   #1
LQ Newbie
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
Question autotrace batch processing


I have been using

autotrace input.png --output-file output.svg
to convert single .png to .svg

how do I convert more than one file at the time? I have 200 .png in one folder that I want to convert to .svg.


Last edited by colucix; 03-31-2012 at 02:44 AM. Reason: Moderator note: removed advertising of personal blog (not allowed at LQ).
Old 04-01-2012, 07:40 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Should be quite easy:

for i in *.png; do
autotrace "$i" --output-file "$(echo $i | sed 's/.png/.svg/')"
That will take all the files in the current directory (e.g. 1.png, foo.png, bah.png) and convert them to .svg (writing them to 1.svg, foo.svg and bah.svg respectively)

Hope this helps,
Old 04-01-2012, 03:43 PM   #3
LQ Newbie
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled

thank you Snark1994!

It worked fine.

I am new to the command line, but I shall get into it more when I have some time.

I am using it as an "effect" on a video, like this:

ffmpeg -i fro.avi image%d.png
for i in *.png; do autotrace "$i" -despeckle-level 14 --output-file "$(echo $i | sed 's/.png/.svg/')"; done
for i in *; do rsvg-convert $i -o `echo $i | sed -e 's/svg$/png/'`; done
ffmpeg -i image%d.png -vcodec huffyuv test.avi
and it gives a really nice cartoonie look to the video, when I know more about what I am doing, I shall put togheter a script of it, so that it deletes all svgs and pngs in the end.

Thanks again!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Processing ankan Linux - Software 3 10-11-2013 10:52 AM
batch processing with awk sag47 Linux - General 2 12-04-2010 07:57 AM
[SOLVED] Batch processing images. JamesGT Slackware 12 09-13-2010 07:16 PM
script help for batch processing mma8x Linux - General 5 12-08-2006 01:31 AM
Image batch processing cvzyl Linux - Software 3 03-20-2006 02:45 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration