/[MITgcm]/MITgcm_contrib/afe/osse_MkII/piv/addcross.pl
ViewVC logotype

Annotation of /MITgcm_contrib/afe/osse_MkII/piv/addcross.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Jul 22 18:20:35 2005 UTC (20 years ago) by afe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +13 -9 lines
File MIME type: text/plain
added proper command line args

1 afe 1.1 #!/usr/bin/perl
2    
3     $bar=10;
4     @horiz=( 150, 150, 500, 500 );
5     @vert=( 180, 320, 180, 320);
6    
7 afe 1.2 $infile=$ARGV[0];
8     $outfile=$ARGV[1];
9    
10     if (($infile eq "") || ($outfile eq "")) {
11     die "Usage: addcross.pl infile outfile\n";
12     }
13    
14     $cmdconv="convert $infile -stroke white -strokewidth 3 ";
15 afe 1.1
16     foreach $x (@horiz) {
17     $y=shift( @vert);
18    
19     $xh=$x+$bar; $xl=$x-$bar;
20     $yh=$y+$bar; $yl=$y-$bar;
21    
22     $cmdconv .= "-draw \"line $xh,$y $xl,$y\" ";
23     $cmdconv .= "-draw \"line $x,$yh $x,$yl\" ";
24     }
25    
26 afe 1.2 $cmdconv .= "$outfile ";
27 afe 1.1 system $cmdconv;
28    
29 afe 1.2 $cmddisp = "display $outfile &";
30 afe 1.1 system $cmddisp;
31 afe 1.2
32    
33    

  ViewVC Help
Powered by ViewVC 1.1.22