View Source QRex.QRCode (qrex v0.1.0)

Represents the decoded data and metadata of a QR code.

This struct contains all the essential information extracted from a QR code, including its content, version, size, error correction level, and position in the image.

Fields

  • :text - The decoded textual content of the QR code
  • :version - QR code version number (1-40)
  • :modules - Size of the QR code in modules (21-177)
  • :ecc_level - Error correction level (0-3)
  • :bounds - List of four coordinate pairs representing the QR code's corners

Examples

%QRex.QRCode{
  text: "Hello, World!",
  version: 1,
  modules: 21,
  ecc_level: 0,
  bounds: [{10, 10}, {31, 10}, {31, 31}, {10, 31}]
}

Summary

Types

t()

QR code data structure.

Types

@type t() :: %QRex.QRCode{
  bounds: [{integer(), integer()}],
  ecc_level: non_neg_integer(),
  modules: pos_integer(),
  text: String.t(),
  version: pos_integer()
}

QR code data structure.

Contains the following fields:

  • :text - The textual content of the QR code
  • :version - The version of the QR code (1-40)
  • :modules - The number of modules in the QR code (21-177)
  • :ecc_level - The error correction level (0-3)
  • :bounds - The four boundary points of the QR code as coordinate pairs