Vor einem Jahr hatte ich schon mal über QR-Codes geschrieben, wie Quick Response online erzeugt werden können.
Jetzt wolle ich mal QR-Codes mit dem Raspberry Pi selbst erstellen. Das geht auch sehr einfach. Wie?
Erste das System auf den aktuellen Stand bringen und dann das qrencode Package installieren:
| 
					 1 2 3 4  | 
						sudo apt-get update sudo apt-get upgrade # installieren von qrencode sudo apt-get install qrencode  | 
					
Eine Mindmap der installierten Abhängikeiten:

Nun ist die Version 3.3 installiert. Wer die neuere 3.4.4 braucht, muss sie halt selbst compilieren (wget, ./configure, make, make install)
So nun wollen wir gleich mal ein paar QR-Cods generieren. Zuerst einen mit einer URL
| 
					 1  | 
						qrencode -l H -o qr-www.wenzlaff.info.png 'http://www.wenzlaff.info'  | 
					
dabei ist der Parameter -l der Korrekturlevel ( L ~7%, M ~15%, Q ~25%, H ~30% ) und ein QR-Code mit einem Text:
| 
					 1  | 
						qrencode -l H -o qr-text.png 'wie findest du den Blog'  | 
					
es gehen aber auch Kontaktdaten (vcard). Dazu eine Textdate erstellen mit Namen vcard.txt:
| 
					 1 2 3 4 5 6 7  | 
						BEGIN:VCARD VERSION:3.0 N:Wenzlaff, Thomas ORG:wenzlaff.de TITLE:Webmaster und Author EMAIL;TYPE=PREF,INTERNET: info-anfrage@wenzlaff.de END:VCARD  | 
					
und dann das generieren mit:
| 
					 1  | 
						qrencode -o tw-vcard-low.png < vcard.txt  | 
					
| 
					 1  | 
						qrencode -l H -o tw-vcard.png < vcard.txt  | 
					

Die Anleitung mit allen Optionen gibt es wie immer mit:
| 
					 1 2 3  | 
						qrencode --help # oder auch mit man qrencode  | 
					
Ausgabe:
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73  | 
						qrencode version 3.3.0 Copyright (C) 2006-2012 Kentaro Fukuchi Usage: qrencode [OPTION]... [STRING] Encode input data in a QR Code and save as a PNG or EPS image.   -h, --help   display the help message. -h displays only the help of short                options.   -o FILENAME, --output=FILENAME                write image to FILENAME. If '-' is specified, the result                will be output to standard output. If -S is given, structured                symbols are written to FILENAME-01.png, FILENAME-02.png, ...                (suffix is removed from FILENAME, if specified)   -s NUMBER, --size=NUMBER                specify module size in dots (pixels). (default=3)   -l {LMQH}, --level={LMQH}                specify error correction level from L (lowest) to H (highest).                (default=L)   -v NUMBER, --symversion=NUMBER                specify the version of the symbol. See SYMBOL VERSIONS for more                information. (default=auto)   -m NUMBER, --margin=NUMBER                specify the width of the margins. (default=4 (2 for Micro QR)))   -d NUMBER, --dpi=NUMBER                specify the DPI of the generated PNG. (default=72)   -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}, --type={PNG,EPS,                SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}                specify the type of the generated image. (default=PNG)   -S, --structured                make structured symbols. Version must be specified.   -k, --kanji  assume that the input text contains kanji (shift-jis).   -c, --casesensitive                encode lower-case alphabet characters in 8-bit mode. (default)   -i, --ignorecase                ignore case distinctions and use only upper-case characters.   -8, --8bit   encode entire data in 8-bit mode. -k, -c and -i will be ignored.       --rle    enable run-length encoding for SVG.   -M, --micro  encode in a Micro QR Code. (experimental)       --foreground=RRGGBB[AA]       --background=RRGGBB[AA]                specify foreground/background color in hexadecimal notation.                6-digit (RGB) or 8-digit (RGBA) form are supported.                Color output support available only in PNG and SVG.   -V, --version                display the version number and copyrights of the qrencode.       --verbose                display verbose information to stderr.   [STRING]     input data. If it is not specified, data will be taken from                standard input. *SYMBOL VERSIONS                The symbol versions of QR Code range from Version 1 to Version                40. Each version has a different module configuration or number                of modules, ranging from Version 1 (21 x 21 modules) up to                Version 40 (177 x 177 modules). Each higher version number                comprises 4 additional modules per side by default. See                http://www.qrcode.com/en/about/version.html for a detailed                version list.  | 
					




