return to first page linux journal archive
keywordscontents
1: #!/usr/local/bin/perl
2:
3: use GD;
4: require 5.002;
5: require "cgi-lib.pl";
6: &ReadParse(*FORM);
7:
8: $mfile = "miss.gif";
9: $afile = "arrow.gif";
10: $FORM{xp} = 200 unless ($FORM{xp});
11: $FORM{yp} = 200 unless ($FORM{yp});
12:
13: open(GIF,$mfile) || die(
	"Cannot open $mfile.");
14: $main = newFromGif GD::Image(GIF) || 
	die("Cannot create image: $mfile.");
15: close GIF;
16:
17: open(GIF,$afile) || die(
	"Cannot open $afile.");
18: $arrow = newFromGif GD::Image(GIF) || 
	die("Cannot create image: $afile.");
19: close GIF;
20:
21: $main->copy(
	$arrow,$FORM{xp},$FORM{yp},0,0,55,55);
22:
23: print "Content-type: image/gif\n\n";
24: print $main->gif;
25: exit;