File: testGD.pl

package info (click to toggle)
libgd-barcode-perl 2.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,388 kB
  • sloc: perl: 6,561; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use GD::Barcode::QRcode;
# with GD::Barcode::QRcode;
my $oGDB = GD::Barcode::QRcode->new('A' x 10, 
                {Ecc=>'L', ModuleSize => 4 });
my $oGD = $oGDB->plot();
open OUT, '>', 'qrc4.png';
binmode OUT;
print OUT $oGD->png;
close OUT;

open OUT, '>', 'qrc4.txt';
print OUT $oGDB->barcode();
close OUT;

# with GD::Barcode;
use GD::Barcode;
my $oGDN = GD::Barcode->new('QRcode', 'A' x 10, 
                        {Ecc => 'L', ModuleSize => 2});

open OUT, '>', 'bar2.png';
binmode OUT;
print OUT $oGDN->plot()->png;
close OUT;
open OUT, '>', 'bar2.txt';
print OUT $oGDN->barcode();
close OUT;