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
24 create QRcode barcode image with GD. This module based on "QRcode
25 image CGI version 0.50 (C)2000-2002,Y.Swetake".
26
27 new
28 $oGdBar = GD::Barcode::QRcode->new($sTxt,
29 { Ecc => Ecc Mode,
30 Version => Version,
31 ModuleSize => Size of 1 modlue,
32 });
33
34 Constructor. Creates a GD::Barcode::QRcode object for $sTxt.
35
36 Parameters:
37
38 Ecc Ecc mode. Select 'M', 'L', 'H' or 'Q' (Default = 'M').
39
40 Version
41 Version ie. size of barcode image (Default = auto select).
42
43 ModuleSize
44 Size of modules(barcode unit) (Default = 1).
45
46 plot()
47 $oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
48
49 creates GD object with barcode image for the $sTxt specified at new
50 method. $iHeight is height of the image. If NoText is 1, the image has
51 no text image of $sTxt.
52
53 ex.
54 my $oGdB = GD::Barcode::QRcode->new('1234567');
55 my $oGD = $oGdB->plot();
56 # $sGD is a GD image with Height=>20 pixels, with no text.
57
58 barcode()
59 $sPtn = $oGdBar->barcode();
60
61 returns a barcode pattern in string with '1' and '0'. '1' means black,
62 '0' means white.
63
64 ex.
65 my $oGdB = GD::Barcode::QRcode->new('1234567');
66 my $sPtn = $oGdB->barcode();
67
68 $errStr
69 $GD::Barcode::QRcode::errStr
70
71 has error message.
72
73 $text
74 $oGdBar->{$text}
75
76 has barcode text based on $sTxt specified in new method.
77
79 Kawai Takanori GCD00051@nifty.ne.jp
80
82 The GD::Barocde::QRcode module is Copyright (c) 2003 Kawai Takanori.
83 Japan. All rights reserved.
84
85 You may distribute under the terms of either the GNU General Public
86 License or the Artistic License, as specified in the Perl README file.
87
89 GD::Barcode
90
91
92
93perl v5.36.0 2022-07-22 Barcode::QRcode(3)