Barcode-Code128
    
    
  
  
  
view release on metacpan or search on metacpan
     eval { require GD; };
     skip "GD not installed - skipping test", 294 if ($@);
     skip "GD version < 1.20 - no png support", 294 unless $GD::VERSION > 1.20;
     my $code = new Barcode::Code128;
     my $test = $code->png("CODE 128");
     my $good = GD::Image->newFromPng('t/code128.png');
     my $image = GD::Image->newFromPngData($test);
     for (my $x=0; $x< $image->width; $x++)
     {
          my $y = int($image->height()/2);
           my ($r, $g, $b) = $image->rgb($image->getPixel($x, $y));
           my ($R, $G, $B) = $good->rgb($good->getPixel($x, $y));
    
  
  
  
( run in 0.262 second using v1.01-cache-2.11-cpan-a1d94b6210f )