Diff for /loncom/cgi/barcode.png between versions 1.2 and 1.3

version 1.2, 2001/08/15 14:03:15 version 1.3, 2001/09/28 20:26:02
Line 32  Content-type: image/gif Line 32  Content-type: image/gif
   
 END  END
   
   unless(defined($ENV{'form.encode'}) and length($ENV{'form.encode'})) {
       $ENV{'form.encode'}='***ERROR***UNDEFINED***';
   }
   
 my $oGdBar=GD::Barcode::Code39->new($ENV{'form.encode'});  my $oGdBar=GD::Barcode::Code39->new($ENV{'form.encode'});
 warn($GD::Barcode::errStr);  if ($GD::Barcode::errStr or !defined($oGdBar)) {
       warn($GD::Barcode::errStr);
       $oGdBar=GD::Barcode::Code39->new('***ERROR***INVALID***');
   }
 my $bindata=$oGdBar->plot->png; # create barcode image  my $bindata=$oGdBar->plot->png; # create barcode image
 undef $oGdBar;  undef $oGdBar;
 binmode(STDOUT);  binmode(STDOUT);
 open OUT,"|pngtopnm|ppmtogif"; # convert into a gif image  open OUT,"|pngtopnm|ppmtogif 2>/dev/null"; # convert into gif image
 print OUT $bindata; # output image  print OUT $bindata; # output image
 $|=1; # be sure to flush before closing  $|=1; # be sure to flush before closing
 close OUT;  close OUT;

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>