qrlib

package
v0.0.0-...-e729d15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// BORDER size around the QR code in pixels
	BORDER = 2
)

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(qr []C.uchar, factor int) (i *image.Gray, err error)

func Generate

func Generate(l string, ec ErrorCorrectionLevel) ([]C.uchar, error)

Generate the QR Code

func Write

func Write(i image.Image, o string) error

write the resulting image to disk

Types

type ErrorCorrectionLevel

type ErrorCorrectionLevel int

ErrorCorrectionLevel Codes: Level Low -> 7% Error Correction Capability Level Medium -> 15% Level Quality -> 25% Level High -> 30%

const (
	//ECLL Low
	ECLL ErrorCorrectionLevel = iota
	//ECLM Medium
	ECLM
	//ECLQ Quality
	ECLQ
	//ECLH High
	ECLH
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL