Revision 96,
442 bytes
checked in by yasumichi, 15 years ago
(diff) |
first import
|
Rev | Line | |
---|
[96] | 1 | #! /bin/bash |
---|
| 2 | |
---|
| 3 | PATH=$PATH:/usr/bin |
---|
| 4 | |
---|
| 5 | cutVMpng(){ |
---|
| 6 | echo "processing $i..." |
---|
| 7 | |
---|
| 8 | xoff=10 |
---|
| 9 | yoff=53 |
---|
| 10 | fwidth=`file $1 |cut -f 2 -d"," | cut -f2 -d" "` |
---|
| 11 | fheight=`file $1 |cut -f 2 -d"," | cut -f4 -d" "` |
---|
| 12 | |
---|
| 13 | width=$(echo $fwidth - 18 |bc -l) |
---|
| 14 | height=$(echo $fheight - 79 |bc -l) |
---|
| 15 | pngtopnm $i | pnmcut $xoff $yoff $width $height | pnmtopng >${i%.???}-nf.png |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | for i in $*; do |
---|
| 19 | case $i in |
---|
| 20 | *-s.png|*-nf.png) ;; |
---|
| 21 | *.png) cutVMpng $i ;; |
---|
| 22 | *) ;; |
---|
| 23 | esac |
---|
| 24 | done |
---|
| 25 | |
---|
| 26 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.