#!/usr/bin/perl $bar=10; @horiz=( 150, 150, 500, 500 ); @vert=( 180, 320, 180, 320); $infile=$ARGV[0]; $outfile=$ARGV[1]; if (($infile eq "") || ($outfile eq "")) { die "Usage: addcross.pl infile outfile\n"; } $cmdconv="convert $infile -stroke white -strokewidth 3 "; foreach $x (@horiz) { $y=shift( @vert); $xh=$x+$bar; $xl=$x-$bar; $yh=$y+$bar; $yl=$y-$bar; $cmdconv .= "-draw \"line $xh,$y $xl,$y\" "; $cmdconv .= "-draw \"line $x,$yh $x,$yl\" "; } $cmdconv .= "$outfile "; system $cmdconv; $cmddisp = "display $outfile &"; system $cmddisp;