Mailing List Archive


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

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



On 25/02/2008, Stuart Luppescu <slu@example.com> wrote:

>  Anyway know how to use
>  sed or somesuch to automatically change the extension from ps to png?

Since Sig and Godwin have covered the "somesuch", here's the sed:

function ps2png {
  ps_file="$1"
  png_file=`echo "$ps_file" | sed -e 's/\.ps$/.png/'`
  gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=png16m
-sOutputFile="$png_file" -r200x200 "$ps_file"
}

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links