LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

Rep: Reputation: Disabled
Question autotrace batch processing


Hi.

I have been using

Code:
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.


Lars

Last edited by colucix; 03-31-2012 at 03:44 AM. Reason: Moderator note: removed advertising of personal blog (not allowed at LQ).
 
Old 04-01-2012, 08:40 AM   #2
Snark1994
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:

Code:
for i in *.png; do
autotrace "$i" --output-file "$(echo $i | sed 's/.png/.svg/')"
done
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, 04:43 PM   #3
laulau
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Talking

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:

Code:
ffmpeg -i fro.avi image%d.png
Code:
for i in *.png; do autotrace "$i" -despeckle-level 14 --output-file "$(echo $i | sed 's/.png/.svg/')"; done
Code:
for i in *; do rsvg-convert $i -o `echo $i | sed -e 's/svg$/png/'`; done
Code:
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!
 
  


Reply


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 11:52 AM
batch processing with awk sag47 Linux - General 2 12-04-2010 08:57 AM
[SOLVED] Batch processing images. JamesGT Slackware 12 09-13-2010 08:16 PM
script help for batch processing mma8x Linux - General 5 12-08-2006 02:31 AM
Image batch processing cvzyl Linux - Software 3 03-20-2006 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:51 PM.

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