QR codes

From Fixme.ch
Revision as of 09:51, 6 May 2015 by Sasha (Talk | contribs) (Page with various QR code generation methods)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

QR codes are cool.

QRencode

 qrencode https://fixme.ch/

Python qrcode

Just QR code

 import qrcode
 
 qrcode_image = qrcode.make("https://fixme.ch/", border=1)
 qrcode_image.save("qrcode.png")

QR code to size

 import qrcode
 from PIL import Image
 
 qrcode_image = qrcode.make("https://fixme.ch/", border=0)
 qrcode_image = qrcode_image.resize((720, 720), Image.NEAREST)
 qrcode_image.save("qrcode.png")

QR from stdin

 import qrcode
 from PIL import Image
 import sys
 
 qr_data = sys.stdin.read()
 qrcode_image = qrcode.make(qr_data, border=0)
 qrcode_image = qrcode_image.resize((720, 720), Image.NEAREST)
 qrcode_image.save("qrcode.png")

Google QR code API

 https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl=fixme