Basic QR encoder with direct PNG output.
This is a trimmed-down fork of rsc.io/qr, maintained for use in Hugo.
go get github.com/gohugoio/qr
qr: the public API.qr.Encodereturns a*Code, which implementsimage.Imageand can be written directly as PNG withCode.PNG.coding: the low-level QR encoder (versions, levels, masks, bit layout).gf256: Galois field arithmetic used for Reed-Solomon error correction.
coding is tested against reference output recorded from the C libqrencode library, see coding/testdata/libqrencode.golden.