Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Visio-to-PNG Batch Conversion - Possible?



Stuart Luppescu wrote:
function ps2png {
    gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=png16m -sOutputFile=$@example.com -r200x200 $@example.com
    }

It could use some improvement, though. Now I have to feed it the name of
the postscript file *without* the .ps extension. Anyway know how to use
sed or somesuch to automatically change the extension from ps to png?

Really trivial solution that should work for a directory as long as your files only have one dot in them (e.g not "I.have.no.idea.how.to.name.file.ps"):


   for i in `ls *.ps|cut -d\. -f 1`; do  ps2png $i.ps $i.png; done

kind regards,
-sig

--
Sigurd Urdahl
Linux, goofing, cooking, making fire, computer security, having a
beer. Give me good music.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links