package qr

Import Path (on

Dependency Relation
	imports 8 packages, and imported by one package

Involved Source Files png.go Package qr encodes QR codes.
Package-Level Type Names (total 6, in which 2 are exported)
/* sort exporteds by: | */
A Code is a square pixel grid. It implements image.Image and direct PNG encoding. // 1 is black, 0 is white // number of image pixels per QR pixel // number of pixels on a side // number of bytes per row Black returns true if the pixel at (x,y) is black. Image returns an Image displaying the code. PNG returns a PNG image displaying the code. PNG uses a custom encoder tailored to QR codes. Its compressed size is about 2x away from optimal, but it runs about 20x faster than calling png.Encode on c.Image(). func Encode(text string, level Level) (*Code, error)
A Level denotes a QR error correction level. From least to most tolerant of errors, they are L, M, Q, H. func Encode(text string, level Level) (*Code, error) func Level) (image.Image, error) const H const L const M const Q
Package-Level Functions (total 3, in which 1 is exported)
Encode returns an encoding of text at the given error correction level.
Package-Level Variables (total 4, none are exported)
Package-Level Constants (total 5, in which 4 are exported)
const H Level = 3 // 65% redundant
const L Level = 0 // 20% redundant
const M Level = 1 // 38% redundant
const Q Level = 2 // 55% redundant