extract

package
v0.0.0-...-1948922 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

Format returns the QR-code "format", i.e. the mask ID used for the data dots and the error correction level. It uses both occurrences of the format and its error correction code, and returns the more likely value among all the encoded values. It fails when the format cannot be clearly recovered from the error correction codes.

func ReadBits

func ReadBits(dots [][]bool, maskID MaskID) []bool

ReadBits extracts the contents bits from the QR-code, excluding markers and all special dots, applying the given mask, and putting everything in the right order. See https://www.thonky.com/qr-code-tutorial/module-placement-matrix#step-6-place-the-data-bits for a visual explanation.

func Version

func Version(dots detect.QRCode) (uint, error)

Version gets the QR-code version. In our demo, it is not so useful, but helps detecting false positives.

Types

type ErrorCorrectionLevel

type ErrorCorrectionLevel uint8
const (
	ErrorCorrectionLevelMedium ErrorCorrectionLevel = iota
	ErrorCorrectionLevelLow
	ErrorCorrectionLevelHigh
	ErrorCorrectionLevelQuartile
)

type MaskID

type MaskID uint8

Jump to

Keyboard shortcuts

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