Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidQrcode = errors.New("invalid qrcode")
)
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Margin size around the QRCode. Margin int // Invert colors of the QRCode. Invert bool }
Options is used to customize the ASCII-art.
type QRCode ¶
type QRCode struct {
// contains filtered or unexported fields
}
QRCode holds the dot map of a QRCode.
func Parse ¶
Parse parses QRCode image from an io.Reader.
Example ¶
qrFile := "/path/to/qrcode.png" f, err := os.Open(qrFile) if err != nil { log.Fatalf("Load QRCode image failed: %s", err) } defer f.Close() if qr, err := Parse(f); err != nil { log.Fatalf("Parse QRCode image failed: %s", err) } else { print(qr.String()) }
Output:
func ParseImage ¶
ParseImage parses QRCode image.
Click to show internal directories.
Click to hide internal directories.