一:要生成二维码:
方案一:
sudo apt-get install qrencode
方案二:
1.下载源码
http://www.oschina.net/p/libqrencode
2.下载依赖库
apt-get install libpng*
apt-get install zlib*
3.配置
./configure./configure --without-tools
It also installs a binary "qrencode" to /usr/local/bin. If youwant not to
install it, give "--without-tools" option to the configure script.
4.
make
5.
make install
6.
./qrencode -V
qrencode version 3.2.0
Copyright (C) 2006-2011 Kentaro Fukuchi
7.
生成格式:qrencode -o [filename.png] '[text/url/information to encode]'
./qrencode -o baidu.png 'http://www.baidu.com'
生成二维码图片
二:识别二维码
1.安装libdecodeqr-examples
apt-getinstalllibdecodeqr-examples
2.识别二维码
libdecodeqr-simpletest<二维码图片>
比如识别之前生成的二维码图片
libdecodeqr-simpletestbaidu.png