source: projects/Vine-manual/trunk/images/vmcut.sh @ 96

Revision 96, 442 bytes checked in by yasumichi, 15 years ago (diff)

first import

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