--- loncom/cgi/barcode.png 2002/01/03 14:22:58 1.8 +++ loncom/cgi/barcode.png 2002/12/13 21:33:30 1.10 @@ -1,9 +1,9 @@ #!/usr/bin/perl # The LearningOnline Network with CAPA -# barcode.gif - A CGI script that dynamically outputs a barcode. +# barcode.png - A CGI script that dynamically outputs a barcode. # -# $Id: barcode.png,v 1.8 2002/01/03 14:22:58 matthew Exp $ +# $Id: barcode.png,v 1.10 2002/12/13 21:33:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,16 +53,16 @@ foreach (split(/&/,$ENV{'QUERY_STRING'}) } } -# Tell the server we are sending a gif graphic +# Tell the server we are sending a png graphic print <new($text); if ($GD::Barcode::errStr or !defined($oGdBar)) { warn($GD::Barcode::errStr); @@ -71,7 +71,8 @@ if ($GD::Barcode::errStr or !defined($oG my $bindata=$oGdBar->plot->png; # create barcode image undef $oGdBar; binmode(STDOUT); -open OUT,"|pngtopnm|ppmtogif 2>/dev/null"; # convert into gif image -print OUT $bindata; # output image -$|=1; # be sure to flush before closing -close OUT; +#open OUT,"|pngtopnm|ppmtogif 2>/dev/null"; # convert into gif image +#print OUT $bindata; # output image +#$|=1; # be sure to flush before closing +#close OUT; +print $bindata;