qr

package
v0.0.0-...-d92929c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(img image.Image) (string, error)

Decode an image with QR code.

func Encode

func Encode(data string, size int, lvl RecoveryLevel) (image.Image, error)

Encode encodes data into the image with QR code.

Types

type RecoveryLevel

type RecoveryLevel int

RecoveryLevel represents QR encoding error detection/recovery capacity.

const (
	// Low is Level L: 7% error recovery.
	Low RecoveryLevel = iota

	// Medium is Level M: 15% error recovery. Good default choice.
	Medium

	// High is Level Q: 25% error recovery.
	High

	// Highers is Level H: 30% error recovery.
	Highest
)

func (RecoveryLevel) String

func (r RecoveryLevel) String() string

String implements Stringer interface.

Jump to

Keyboard shortcuts

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