CodeGlyphX logo
CodeGlyphX

API Reference

Class

CodeGlyphDecodeOptions

Namespace CodeGlyphX
Assembly CodeGlyphX
Modifiers sealed

Options for unified QR/barcode decoding.

Inheritance

  • Object
  • CodeGlyphDecodeOptions

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

public CodeGlyphDecodeOptions() #

Methods

public static CodeGlyphDecodeOptions Balanced() #
Returns: CodeGlyphDecodeOptions

Balanced preset (good default for most images).

public static CodeGlyphDecodeOptions Fast() #
Returns: CodeGlyphDecodeOptions

Fast preset (lower accuracy, fewer transforms).

public CodeGlyphDecodeOptions IncludeBarcodeResults(Boolean enabled = true) #
Returns: CodeGlyphDecodeOptions

Include 1D barcode results when decoding multiple symbols.

Parameters

enabled System.Boolean = true optionalposition: 0
public CodeGlyphDecodeOptions PreferBarcodeFirst(Boolean enabled = true) #
Returns: CodeGlyphDecodeOptions

Prefer trying barcodes before 2D codes.

Parameters

enabled System.Boolean = true optionalposition: 0
public static CodeGlyphDecodeOptions Robust() #
Returns: CodeGlyphDecodeOptions

Robust preset (best accuracy, slower).

public static CodeGlyphDecodeOptions Screen(Int32 maxMilliseconds = 300, Int32 maxDimension = 1200) #
Returns: CodeGlyphDecodeOptions

Screen preset (budgeted decode for UI capture scenarios).

Parameters

maxMilliseconds System.Int32 = 300 optionalposition: 0
maxDimension System.Int32 = 1200 optionalposition: 1
public static CodeGlyphDecodeOptions Stylized() #
Returns: CodeGlyphDecodeOptions

Stylized preset (adds aggressive sampling for QR art).

public CodeGlyphDecodeOptions WithAggressiveQrSampling(Boolean enabled = true) #
Returns: CodeGlyphDecodeOptions

Enables aggressive QR sampling.

Parameters

enabled System.Boolean = true optionalposition: 0
public CodeGlyphDecodeOptions WithBarcode(Action<BarcodeDecodeOptions> configure) #
Returns: CodeGlyphDecodeOptions

Configures barcode decode options fluently.

Parameters

configure System.Action{CodeGlyphX.BarcodeDecodeOptions} requiredposition: 0
public CodeGlyphDecodeOptions WithCancellation(CancellationToken token) #
Returns: CodeGlyphDecodeOptions

Sets a cancellation token for decoding.

Parameters

token System.Threading.CancellationToken requiredposition: 0
public CodeGlyphDecodeOptions WithExpectedBarcode(Nullable<BarcodeType> barcodeType) #
Returns: CodeGlyphDecodeOptions

Sets the expected barcode type.

Parameters

barcodeType System.Nullable{CodeGlyphX.BarcodeType} requiredposition: 0
public CodeGlyphDecodeOptions WithImage(Action<ImageDecodeOptions> configure) #
Returns: CodeGlyphDecodeOptions

Configures image decode options fluently.

Parameters

configure System.Action{CodeGlyphX.ImageDecodeOptions} requiredposition: 0
public CodeGlyphDecodeOptions WithImageBudget(Int32 maxMilliseconds, Int32 maxDimension = 0) #
Returns: CodeGlyphDecodeOptions

Applies a non-QR image decode budget (milliseconds + optional max dimension).

Parameters

maxMilliseconds System.Int32 requiredposition: 0
maxDimension System.Int32 = 0 optionalposition: 1
public CodeGlyphDecodeOptions WithImageMaxBytes(Int32 maxBytes) #
Returns: CodeGlyphDecodeOptions

Sets the maximum input size in bytes for non-QR image decoding.

Parameters

maxBytes System.Int32 requiredposition: 0
public CodeGlyphDecodeOptions WithImageMaxPixels(Int64 maxPixels) #
Returns: CodeGlyphDecodeOptions

Sets the maximum pixel count allowed for non-QR image decoding.

Parameters

maxPixels System.Int64 requiredposition: 0
WithJpegOptions 2 overloads
public CodeGlyphDecodeOptions WithJpegOptions(JpegDecodeOptions options) #
Returns: CodeGlyphDecodeOptions

Sets JPEG decoding options on the image decode options.

Parameters

options CodeGlyphX.Rendering.Jpeg.JpegDecodeOptions requiredposition: 0

Examples


var options = new CodeGlyphDecodeOptions()
    .WithJpegOptions(highQualityChroma: true, allowTruncated: true);
                
public CodeGlyphDecodeOptions WithJpegOptions(Boolean highQualityChroma = false, Boolean allowTruncated = false) #
Returns: CodeGlyphDecodeOptions

Sets JPEG decoding options on the image decode options.

Parameters

highQualityChroma System.Boolean = false optionalposition: 0
allowTruncated System.Boolean = false optionalposition: 1

Examples


var options = new CodeGlyphDecodeOptions()
    .WithJpegOptions(highQualityChroma: true);
                
public CodeGlyphDecodeOptions WithQr(Action<QrPixelDecodeOptions> configure) #
Returns: CodeGlyphDecodeOptions

Configures QR decode options fluently.

Parameters

configure System.Action{CodeGlyphX.QrPixelDecodeOptions} requiredposition: 0
public CodeGlyphDecodeOptions WithQrBudget(Int32 maxMilliseconds, Int32 maxDimension = 0) #
Returns: CodeGlyphDecodeOptions

Applies a QR decode budget (milliseconds + optional max dimension).

Parameters

maxMilliseconds System.Int32 requiredposition: 0
maxDimension System.Int32 = 0 optionalposition: 1
public CodeGlyphDecodeOptions WithQrMaxScale(Int32 maxScale) #
Returns: CodeGlyphDecodeOptions

Overrides maximum QR scale.

Parameters

maxScale System.Int32 requiredposition: 0
public CodeGlyphDecodeOptions WithQrProfile(QrDecodeProfile profile) #
Returns: CodeGlyphDecodeOptions

Sets the QR profile for this decode.

Parameters

profile CodeGlyphX.QrDecodeProfile requiredposition: 0

Properties

public Nullable<BarcodeType> ExpectedBarcode { get; set; } #

Expected barcode type (optional hint for 1D decoding).

public BarcodeDecodeOptions Barcode { get; set; } #

Options for 1D barcode decoding.

public Code39ChecksumPolicy Code39Checksum { get; set; } #

Controls how Code39 checksum characters are handled during decode.

public MsiChecksumPolicy MsiChecksum { get; set; } #

Controls how MSI checksum digits are handled during decode.

public Code11ChecksumPolicy Code11Checksum { get; set; } #

Controls how Code 11 checksum characters are handled during decode.

public PlesseyChecksumPolicy PlesseyChecksum { get; set; } #

Controls whether Plessey CRC validation is required during decode.

public Boolean PreferBarcode { get; set; } #

Prefer trying barcodes before 2D codes.

public Boolean IncludeBarcode { get; set; } #

Include 1D barcode results when decoding multiple symbols.

public QrPixelDecodeOptions Qr { get; set; } #

QR decode options (profile, budget, etc.).

public ImageDecodeOptions Image { get; set; } #

Image decode options for non-QR symbols.

public QrDecodeProfile Profile { get; set; } #

Speed/accuracy profile for QR pixel decoding (default: Robust).

public Int32 MaxDimension { get; set; } #

Maximum dimension (pixels) for QR decoding. Larger inputs will be downscaled by sampling. Set to 0 to disable.

public Int32 MaxScale { get; set; } #

Maximum scale to try when decoding QR (1..8). Set to 0 to use profile defaults.

public Int32 MaxMilliseconds { get; set; } #

Maximum milliseconds to spend decoding QR (best effort). Set to 0 to disable.

public Boolean DisableTransforms { get; set; } #

Disable rotation/mirroring attempts for QR decoding, even in robust profiles.

public Boolean AggressiveSampling { get; set; } #

Enables extra thresholding/sampling passes for stylized or noisy QR codes (slower).

public Int32 MaxImageDimension { get; set; } #

Maximum image dimension (pixels) for non-QR decoding. Larger inputs will be downscaled. Set to 0 to disable.

public Int64 MaxImagePixels { get; set; } #

Maximum pixel count allowed for non-QR image decoding (width * height). Set to 0 to disable.

public Int32 MaxImageBytes { get; set; } #

Maximum input size in bytes for non-QR image decoding. Set to 0 to disable.

public Int32 MaxImageMilliseconds { get; set; } #

Maximum milliseconds to spend decoding non-QR symbols (best effort). Set to 0 to disable.

public CancellationToken CancellationToken { get; set; } #

Cancellation token for decoding.