memo.xight.org

/ / memo.xight.org

2006-03-05

GD::Barcode::QRcode を用いた QRコード生成

- Summary
http://example.com/cgi-bin/qr.cgi?q=QRコードにしたい文字列
でQRコードの画像を生成したい.

- 準備

# cpan -i GD::Barcode::QRcode


- 注意
GD::Barcode::QRcode (0.01) 40行目を変更

#$oSelf->{Version} = $rhPrm->{Version} || 1;
$oSelf->{Version} = $rhPrm->{Version};


- Source
#!/usr/bin/perl
use strict;
use CGI;
use GD::Barcode::QRcode;
 
my $q		= new CGI;
my $str		= $q->param('q');
my $header	= qq(Content-Type: image/png\n\n);
my $qr		= GD::Barcode::QRcode->new($str)->plot->png;
print $header,$qr;
exit;


- Reference
GD::Barcode::QRcode
Debian パッケージディレクトリ検索 (バイナリ) - libgd-graph-perl

どんぞこ日誌(2004-07-25)
http://donzoko.net/cgi-bin/tdiary/20040725.html
カテゴリ: [Perl][QRCode]
内部リンク: [2006-03-06-1]
2006-03 /

Color Reference

ChangeLogを検索
携帯電話からアクセス!

カテゴリ

最近の話題

リンク

過去ログ

Google

QR Code

Since
2002-11-28
Update
2008-09-05 14:14
Copyright © 2005 xight.org All Rights Reserved.