Mar 20, 2001, 6:17 AM
Post #5 of 7
Thanks for the suggestions, which I've tried out.
Re: Printing two graphics - impossible?
[In reply to]
Now I've isolated the printing from the file manipulation. Now I just print an array, which just happens to be a GIF graphic. As you see, I also tried cramming two graphics into one array, in the vain hope that both would print.
my $imagedir="/home/ianmac/graphics"; # graphics directory
print "Content-Type: image/gif\n\n"; # Header set for graphic output.
open (IMAGE, "$imagedir/digit_8.gif") || exit; # open hard-wired file
my @graphic = <IMAGE>; # copy image to an array
push (@graphic, @graphic); # double the file - 2 gif pictures joined
close (IMAGE); # We no longer need it. We have a (doubled) copy
print @graphic; # prints one of the gif pictures and ignores the other half of the array
binmode STDOUT; binmode @graphic; # shouldn't be needed with a UNIX server
print @graphic; # Does nothing at all.
# end of script