--- loncom/cgi/plot.gif 2003/09/24 21:15:55 1.10 +++ loncom/cgi/plot.gif 2004/06/21 20:04:29 1.11 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $Id: plot.gif,v 1.10 2003/09/24 21:15:55 matthew Exp $ +# $Id: plot.gif,v 1.11 2004/06/21 20:04:29 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,10 +43,10 @@ $filename = $tmpdir . $filename; die "$data{'file'} does not exist\n" if (! -e $filename); my $output = $data{'output'}; -if ($output eq 'gif') { +if ($output eq 'gif' || $output eq 'png') { open PLOT, "gnuplot $filename |"; print <<"END"; -Content-type: image/gif +Content-type: image/$output END while ($_=) { @@ -72,6 +72,3 @@ END } else { die "output $output is not a recognized value or has no value\n"; } - - -