CodeGlyphX logo
CodeGlyphX

API Reference

Class

QrDecoder

Namespace CodeGlyphX
Assembly CodeGlyphX
Modifiers static

Decodes QR codes from a module grid or from raw pixels (clean images).

Inheritance

  • Object
  • QrDecoder

Remarks

Current scope: byte + kanji payloads on clean/generated images and clean on-screen QR codes.

Methods

TryDecode 16 overloads
public static Boolean TryDecode(BitMatrix modules, out QrDecoded result) #
Returns: Boolean

Attempts to decode a QR code from an exact module grid (no quiet zone).

Parameters

modules CodeGlyphX.BitMatrix requiredposition: 0
Square matrix of QR modules (dark = true).
result CodeGlyphX.QrDecoded@ requiredposition: 1
Decoded payload.

Returns

true when decoding succeeded; otherwise false.

public static Boolean TryDecode(BitMatrix modules, out QrDecoded result, CancellationToken cancellationToken) #
Returns: Boolean

Attempts to decode a QR code from an exact module grid (no quiet zone), with diagnostics.

Parameters

modules CodeGlyphX.BitMatrix requiredposition: 0
Square matrix of QR modules (dark = true).
result CodeGlyphX.QrDecoded@ requiredposition: 1
Decoded payload.
info CodeGlyphX.QrDecodeInfo@ requiredposition: 2
Decode diagnostics.

Returns

true when decoding succeeded; otherwise false.

TryDecode(CodeGlyphX.BitMatrix modules, CodeGlyphX.QrDecoded@ result, System.Threading.CancellationToken cancellationToken) #

Attempts to decode a QR code from an exact module grid, with cancellation.

Parameters

modules CodeGlyphX.BitMatrix required
result CodeGlyphX.QrDecoded@ required
cancellationToken System.Threading.CancellationToken required
public static Boolean TryDecode(BitMatrix modules, out QrDecoded result, out QrDecodeInfo info, CancellationToken cancellationToken) #
Returns: Boolean

Attempts to decode a QR code from an exact module grid, with diagnostics and cancellation.

Parameters

modules CodeGlyphX.BitMatrix requiredposition: 0
result CodeGlyphX.QrDecoded@ requiredposition: 1
info CodeGlyphX.QrDecodeInfo@ requiredposition: 2
cancellationToken System.Threading.CancellationToken requiredposition: 3
public static Boolean TryDecode(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded result) #
Returns: Boolean

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs).

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
Pixel buffer.
width System.Int32 requiredposition: 1
Image width in pixels.
height System.Int32 requiredposition: 2
Image height in pixels.
stride System.Int32 requiredposition: 3
Bytes per row.
fmt CodeGlyphX.PixelFormat requiredposition: 4
Pixel format (4 bytes per pixel).
result CodeGlyphX.QrDecoded@ requiredposition: 5
Decoded payload.

Returns

true when decoding succeeded; otherwise false.

public static Boolean TryDecode(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded result, out QrPixelDecodeInfo info) #
Returns: Boolean

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs) using the specified profile.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
result CodeGlyphX.QrDecoded@ requiredposition: 5
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 6
public static Boolean TryDecode(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded result, out QrPixelDecodeInfo info, QrPixelDecodeOptions options) #
Returns: Boolean

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs) using the specified profile, with cancellation.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
result CodeGlyphX.QrDecoded@ requiredposition: 5
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 6
cancellationToken System.Threading.CancellationToken requiredposition: 7
TryDecode(System.ReadOnlySpan{System.Byte} pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeInfo@ info) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics.

Parameters

pixels System.ReadOnlySpan{System.Byte} required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
TryDecode(System.ReadOnlySpan{System.Byte} pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics and profile options.

Parameters

pixels System.ReadOnlySpan{System.Byte} required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
public static Boolean TryDecode(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded result, out QrPixelDecodeInfo info, QrPixelDecodeOptions options, CancellationToken cancellationToken) #
Returns: Boolean

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics, profile options, and cancellation.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
result CodeGlyphX.QrDecoded@ requiredposition: 5
info CodeGlyphX.QrPixelDecodeInfo@ requiredposition: 6
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 7
cancellationToken System.Threading.CancellationToken requiredposition: 8
TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs).

Parameters

pixels System.Byte[] required
Pixel buffer.
width System.Int32 required
Image width in pixels.
height System.Int32 required
Image height in pixels.
stride System.Int32 required
Bytes per row.
fmt CodeGlyphX.PixelFormat required
Pixel format (4 bytes per pixel).
result CodeGlyphX.QrDecoded@ required
Decoded payload.

Returns

true when decoding succeeded; otherwise false.

TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs) using the specified profile.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
options CodeGlyphX.QrPixelDecodeOptions required
TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeOptions options, System.Threading.CancellationToken cancellationToken) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs) using the specified profile, with cancellation.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
options CodeGlyphX.QrPixelDecodeOptions required
cancellationToken System.Threading.CancellationToken required
TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeInfo@ info) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics and profile options.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
TryDecode(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded@ result, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options, System.Threading.CancellationToken cancellationToken) #

Attempts to decode a QR code from raw pixel data (best-effort, clean inputs), with diagnostics, profile options, and cancellation.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
result CodeGlyphX.QrDecoded@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
cancellationToken System.Threading.CancellationToken required
TryDecodeAll 12 overloads
public static Boolean TryDecodeAll(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded[] results) #
Returns: Boolean

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs).

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
results CodeGlyphX.QrDecoded[]@ requiredposition: 5
public static Boolean TryDecodeAll(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded[] results, out QrPixelDecodeInfo info) #
Returns: Boolean

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs) using the specified profile.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
results CodeGlyphX.QrDecoded[]@ requiredposition: 5
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 6
public static Boolean TryDecodeAll(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded[] results, out QrPixelDecodeInfo info, QrPixelDecodeOptions options) #
Returns: Boolean

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs) using the specified profile, with cancellation.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
results CodeGlyphX.QrDecoded[]@ requiredposition: 5
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 6
cancellationToken System.Threading.CancellationToken requiredposition: 7
TryDecodeAll(System.ReadOnlySpan{System.Byte} pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeInfo@ info) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics.

Parameters

pixels System.ReadOnlySpan{System.Byte} required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
TryDecodeAll(System.ReadOnlySpan{System.Byte} pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics and profile options.

Parameters

pixels System.ReadOnlySpan{System.Byte} required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
public static Boolean TryDecodeAll(Byte[] pixels, Int32 width, Int32 height, Int32 stride, PixelFormat fmt, out QrDecoded[] results, out QrPixelDecodeInfo info, QrPixelDecodeOptions options, CancellationToken cancellationToken) #
Returns: Boolean

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics, profile options, and cancellation.

Parameters

pixels System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32 requiredposition: 1
height System.Int32 requiredposition: 2
stride System.Int32 requiredposition: 3
fmt CodeGlyphX.PixelFormat requiredposition: 4
results CodeGlyphX.QrDecoded[]@ requiredposition: 5
info CodeGlyphX.QrPixelDecodeInfo@ requiredposition: 6
options CodeGlyphX.QrPixelDecodeOptions requiredposition: 7
cancellationToken System.Threading.CancellationToken requiredposition: 8
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs).

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs) using the specified profile.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
options CodeGlyphX.QrPixelDecodeOptions required
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeOptions options, System.Threading.CancellationToken cancellationToken) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs) using the specified profile, with cancellation.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
options CodeGlyphX.QrPixelDecodeOptions required
cancellationToken System.Threading.CancellationToken required
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeInfo@ info) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics and profile options.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
TryDecodeAll(System.Byte[] pixels, System.Int32 width, System.Int32 height, System.Int32 stride, CodeGlyphX.PixelFormat fmt, CodeGlyphX.QrDecoded[]@ results, CodeGlyphX.QrPixelDecodeInfo@ info, CodeGlyphX.QrPixelDecodeOptions options, System.Threading.CancellationToken cancellationToken) #

Attempts to decode all QR codes from raw pixel data (best-effort, clean inputs), with diagnostics, profile options, and cancellation.

Parameters

pixels System.Byte[] required
width System.Int32 required
height System.Int32 required
stride System.Int32 required
fmt CodeGlyphX.PixelFormat required
results CodeGlyphX.QrDecoded[]@ required
info CodeGlyphX.QrPixelDecodeInfo@ required
options CodeGlyphX.QrPixelDecodeOptions required
cancellationToken System.Threading.CancellationToken required