Last change
on this file since 88 was
85,
checked in by aslmd, 14 years ago
|
LMD_MM_MARS et LMD_LES_MARS: ajout des routines IDL pour tracer les sorties --> voir mesoscale/PLOT
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[85] | 1 | #! /bin/bash |
---|
| 2 | # A. Spiga - October-December 2008 |
---|
| 3 | # use: ps2png |
---|
| 4 | # options: -r 200 indicates a resolution of 200 |
---|
| 5 | # -a indicates the alternate use of ps2epsi |
---|
| 6 | |
---|
| 7 | ########## |
---|
| 8 | resol=150 |
---|
| 9 | ########## |
---|
| 10 | |
---|
| 11 | while getopts "r:a" options; do |
---|
| 12 | case $options in |
---|
| 13 | r ) resol=${OPTARG} |
---|
| 14 | echo conversion resolution is ${resol} resolution ;; |
---|
| 15 | a ) yeahyeah=1 |
---|
| 16 | esac |
---|
| 17 | done |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | if [[ $(ls | grep "\.ps") != "" ]] |
---|
| 21 | then |
---|
| 22 | if [[ "${yeahyeah}" == "1" ]] |
---|
| 23 | then |
---|
| 24 | echo convert $(ls | grep "\.ps" | wc -l) ps files with ps2epsi |
---|
| 25 | find *.ps -exec ps2epsi {} \; 2> /dev/null |
---|
| 26 | rename -f 's/.epsi/.eps/' *.epsi |
---|
| 27 | else |
---|
| 28 | echo convert $(ls | grep "\.ps" | wc -l) ps files with convert |
---|
| 29 | find *.ps -exec convert {} '{}.eps' \; |
---|
| 30 | rename -f 's/.ps.eps/.eps/' *.ps.eps |
---|
| 31 | fi |
---|
| 32 | fi |
---|
| 33 | |
---|
| 34 | if [[ $(ls | grep "\.eps") != "" ]] |
---|
| 35 | then |
---|
| 36 | echo convert $(ls | grep "\.eps" | wc -l) eps files |
---|
| 37 | find *.eps -exec gs -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile={}.png -dNOPAUSE -dBATCH -dEPSCrop -r${resol}x${resol} {} > /dev/null 2> /dev/null \; |
---|
| 38 | rename -f 's/.eps.png/.png/' *.eps.png |
---|
| 39 | fi |
---|
| 40 | |
---|
| 41 | #if [[ $(which pngnq) != "" ]] |
---|
| 42 | #then |
---|
| 43 | #echo optimizing ... |
---|
| 44 | #pngnq -vf -s1 *.png > /dev/null 2> /dev/null |
---|
| 45 | #rename -f 's/-nq8.png$/.png/' *.png |
---|
| 46 | #fi |
---|
| 47 | |
---|
| 48 | ##if [[ $(which optipng) != "" ]] |
---|
| 49 | ##then |
---|
| 50 | ##echo optimizing 2 ... |
---|
| 51 | ##optipng -o7 *.png > /dev/null 2> /dev/null |
---|
| 52 | ##fi |
---|
Note: See
TracBrowser
for help on using the repository browser.