package qr
Import Path
rsc.io/qr (on go.dev)
Dependency Relation
imports 8 packages, and imported by one package
Package-Level Type Names (total 6, in which 2 are exported)
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)
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)
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |