# Encode and decode QR codes


Introduction

QR (Quick Response) code is a type of matrix (2D) barcode.
QR codes have greater storage capacity compared to standard UPC (Universal Product Code) barcodes.

http://en.wikipedia.org/wiki/QR_code

Encode

# apt-get install qrencode
# wc -c glider.png
724 glider.png
# xxd -p -c 724 glider.png | qrencode -o qrcode.png
Decode

# apt-get install zbar-tools
# zbarimg --quiet --raw qrcode.png | xxd -p -r > result
# file result
result: PNG image data, 55 x 55, 8-bit grayscale, non-interlaced

No comments: