1Barcode::QRcode(3) User Contributed Perl Documentation Barcode::QRcode(3)
2
3
4
6 GD::Barcode::QRcode - Create QRcode barcode image with GD
7
9 ex. CGI
10
11 use GD::Barcode::QRcode;
12 binmode(STDOUT);
13 print "Content-Type: image/png\n\n";
14 print GD::Barcode::QRcode->new('1234567')->plot->png;
15
16 with UnitSize, ECC settings
17
18 my $oGdBar = GD::Barcode::QRcode->new('123456789',
19 { Ecc => 'L', Version=>2, ModuleSize => 2}
20 );
21
23 GD::Barcode::QRcode is a subclass of GD::Barcode and allows you to cre‐
24 ate QRcode barcode image with GD. This module based on "QRcode image
25 CGI version 0.50 (C)2000-2002,Y.Swetake".
26
27 new
28
29 $oGdBar = GD::Barcode::QRcode->new($sTxt,
30 { Ecc => Ecc Mode,
31 Version => Version,
32 ModuleSize => Size of 1 modlue,
33 });
34
35 Constructor. Creates a GD::Barcode::QRcode object for $sTxt.
36
37 Parameters:
38
39 Ecc Ecc mode. Select 'M', 'L', 'H' or 'Q' (Default = 'M').
40
41 Version
42 Version ie. size of barcode image (Default = auto select).
43
44 ModuleSize
45 Size of modules(barcode unit) (Default = 1).
46
47 plot()
48
49 $oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 ⎪ 1]);
50
51 creates GD object with barcode image for the $sTxt specified at new
52 method. $iHeight is height of the image. If NoText is 1, the image has
53 no text image of $sTxt.
54
55 ex.
56 my $oGdB = GD::Barcode::QRcode->new('1234567');
57 my $oGD = $oGdB->plot();
58 # $sGD is a GD image with Height=>20 pixels, with no text.
59
60 barcode()
61
62 $sPtn = $oGdBar->barcode();
63
64 returns a barcode pattern in string with '1' and '0'. '1' means black,
65 '0' means white.
66
67 ex.
68 my $oGdB = GD::Barcode::QRcode->new('1234567');
69 my $sPtn = $oGdB->barcode();
70
71 $errStr
72
73 $GD::Barcode::QRcode::errStr
74
75 has error message.
76
77 $text
78
79 $oGdBar->{$text}
80
81 has barcode text based on $sTxt specified in new method.
82
84 Kawai Takanori GCD00051@nifty.ne.jp
85
87 The GD::Barocde::QRcode module is Copyright (c) 2003 Kawai Takanori.
88 Japan. All rights reserved.
89
90 You may distribute under the terms of either the GNU General Public
91 License or the Artistic License, as specified in the Perl README file.
92
94 GD::Barcode
95
96
97
98perl v5.8.8 2003-05-29 Barcode::QRcode(3)