Documentation
¶
Index ¶
Constants ¶
View Source
const ( Numeric = iota Alphanumeric Bytes )
Variables ¶
View Source
var BLACK = color.RGBA{0, 0, 0, 255}
View Source
var BLUE = color.RGBA{0, 0, 255, 255}
View Source
var GREEN = color.RGBA{0, 255, 0, 255}
View Source
var Masks = []func(int, int) bool{mask1, mask2, mask3, mask4, mask5, mask6, mask7, mask8}
View Source
var RED = color.RGBA{255, 0, 0, 255}
View Source
var WHITE = color.RGBA{255, 255, 255, 255}
Functions ¶
func CharacterCountBitCapacity ¶
func CharacterCountBitCapacity(mode CharacterSet, version int) (bitCapacity int)
func CreateQRCode ¶
func CreateQRCode(data []byte, opts *CreateOptions) *image.RGBA
Create a qr code from data with options, which may be nil. Data that is numeric or alphanumeric should be passed in their ascii form
Types ¶
type Bits ¶
type Bits []uint8
func CharacterCount ¶
func CharacterCount(count int, mode CharacterSet, version int) Bits
func ConvertToAlphanumeric ¶
func ConvertToBytes ¶
func ConvertToNumeric ¶
type CharacterSet ¶
type CharacterSet int
func AutodetectCharacterSet ¶
func AutodetectCharacterSet(data []byte) CharacterSet
type CreateOptions ¶
type CreateOptions struct { // Selects the level of error correction to use. // "L": recover 7% of codewords // "M": recover 15% // "Q": recover 25% // "H": recover 30% // If unset, defaults to "M" ErrorCorrectionLevel string // The character set to encode the data with. // If unset, the character set will be chosen automatically, // however, encoding formats will not be mixed on the same code. CharacterSet *CharacterSet // The version (size) of the qr code. // If unset, the version will be the smallest that can fit the data Version int }
type QRCodeResult ¶
type QRCodeResult struct { ErrorCorrectionLevel string CharacterSet CharacterSet Version int Data []byte }
func ReadFromImage ¶
func ReadFromImage(img *image.RGBA) (QRCodeResult, error)
func ReadFromWebcam ¶
func ReadFromWebcam(displayIntermediates bool) (QRCodeResult, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.