extract

package
v0.0.0-...-2791328 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MaskID

type MaskID uint8

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.

Jump to

Keyboard shortcuts

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