Options
All
  • Public
  • Public/Protected
  • All
Menu

The main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.

author

Sean Owen

Hierarchy

  • Decoder

Index

Constructors

constructor

Properties

Private rsDecoder

Methods

Private correctErrors

  • correctErrors(codewordBytes: Uint8Array, numDataCodewords: number): void
  • Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place using Reed-Solomon error correction.

    throws

    ChecksumException if error correction fails

    Parameters

    • codewordBytes: Uint8Array

      data and error correction codewords

    • numDataCodewords: number

      number of codewords that are data bytes

    Returns void

decodeBitMatrix

  • Decodes a QR Code represented as a BitMatrix. A 1 or "true" is taken to mean a black module.

    throws

    FormatException if the QR Code cannot be decoded

    throws

    ChecksumException if error correction fails

    Parameters

    • bits: BitMatrix

      booleans representing white/black QR Code modules

    • Optional hints: Map<DecodeHintType, any>

      decoding hints that should be used to influence decoding

    Returns DecoderResult

    text and bytes encoded within the QR Code

Private decodeBitMatrixParser

decodeBooleanArray

  • Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.

    throws

    FormatException if the QR Code cannot be decoded

    throws

    ChecksumException if error correction fails

    Parameters

    • image: boolean[][]

      booleans representing white/black QR Code modules

    • Optional hints: Map<DecodeHintType, any>

      decoding hints that should be used to influence decoding

    Returns DecoderResult

    text and bytes encoded within the QR Code

Generated using TypeDoc