Lines 102-111
binmode(STDOUT);
Link Here
|
102 |
my $type = $input->param('type') || 'Code39'; |
102 |
my $type = $input->param('type') || 'Code39'; |
103 |
my $barcode = $input->param('barcode'); |
103 |
my $barcode = $input->param('barcode'); |
104 |
my $notext = $input->param('notext') ? 1 : 0; |
104 |
my $notext = $input->param('notext') ? 1 : 0; |
|
|
105 |
my $height = $input->param('height') || 50; |
106 |
my $qrcode_modulesize = $input->param('modulesize') || "5"; # 1+ |
105 |
my $image; |
107 |
my $image; |
106 |
|
108 |
|
107 |
eval { |
109 |
eval { |
108 |
$image = GD::Barcode->new( $type, $barcode )->plot( NoText => $notext )->png(); |
110 |
if( $type eq "QRcode" ){ |
|
|
111 |
$image = GD::Barcode->new('QRcode', $barcode, { Ecc => "M", ModuleSize => $qrcode_modulesize } )->plot->png(); |
112 |
} else { |
113 |
$image = GD::Barcode->new( $type, $barcode )->plot( NoText => $notext, Height => $height )->png(); |
114 |
} |
109 |
}; |
115 |
}; |
110 |
|
116 |
|
111 |
if ( $@ ) { |
117 |
if ( $@ ) { |
112 |
- |
|
|