API Reference
ImageDecodeOptions
Options for decoding from image sources (non-QR). Use Int32)/Int32) or set explicit limits for untrusted inputs.
Inheritance
- Object
- ImageDecodeOptions
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property CodeGlyphDecodeOptions.Image
- Method ImageDecodeOptions.Guarded
- Method ImageDecodeOptions.Screen
- Method ImageDecodeOptions.Strict
- Method ImageDecodeOptions.WithJpegOptions
- Method ImageDecodeOptions.WithJpegOptions
- Method ImageDecodeOptions.WithMaxAnimationDurationMs
- Method ImageDecodeOptions.WithMaxAnimationFramePixels
- Method ImageDecodeOptions.WithMaxAnimationFrames
- Method ImageDecodeOptions.WithMaxBytes
- Method ImageDecodeOptions.WithMaxDimension
- Method ImageDecodeOptions.WithMaxPixels
- Method ImageDecodeOptions.WithRecognitionBudget
- Method ImageDecodeOptions.WithRecognitionBudget
- Property ScanOptions.Image
Accepted by parameters
- Method AztecCode.DecodeImageBatch
- Method AztecCode.DecodeImageResult
- Method AztecCode.DecodeImageResult
- Method AztecCode.DecodeImageResult
- Method AztecCode.TryDecodeAllImage
- Method AztecCode.TryDecodeAllImage
- Method AztecCode.TryDecodeAllImage
- Method AztecCode.TryDecodeAllImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodeImage
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePng
- Method AztecCode.TryDecodePngFile
- Method AztecCode.TryDecodePngFile
- Method AztecCode.TryDecodePngFile
- Method AztecCode.TryDecodePngFile
- Method Barcode.DecodeImageBatch
- Method Barcode.DecodeImageResult
- Method Barcode.DecodeImageResult
- Method Barcode.DecodeImageResult
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodeImage
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePng
- Method Barcode.TryDecodePngFile
- Method Barcode.TryDecodePngFile
- Method Barcode.TryDecodePngFile
- Method Barcode.TryDecodePngFile
- Method CodeGlyphDecodeOptions.WithImage
- Method DataMatrixCode.DecodeImageBatch
- Method DataMatrixCode.DecodeImageResult
- Method DataMatrixCode.DecodeImageResult
- Method DataMatrixCode.DecodeImageResult
- Method DataMatrixCode.TryDecodeAllImage
- Method DataMatrixCode.TryDecodeAllImage
- Method DataMatrixCode.TryDecodeAllImage
- Method DataMatrixCode.TryDecodeAllImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodeImage
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePng
- Method DataMatrixCode.TryDecodePngDetailed
- Method DataMatrixCode.TryDecodePngDetailed
- Method DataMatrixCode.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- Method MicroQrDecoder.TryDecodeImage
- Method MicroQrDecoder.TryDecodeImage
- Method Pdf417Code.DecodeImageBatch
- Method Pdf417Code.DecodeImageResult
- Method Pdf417Code.DecodeImageResult
- Method Pdf417Code.DecodeImageResult
- Method Pdf417Code.TryDecodeAllImage
- Method Pdf417Code.TryDecodeAllImage
- Method Pdf417Code.TryDecodeAllImage
- Method Pdf417Code.TryDecodeAllImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodeImage
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePng
- Method Pdf417Code.TryDecodePngFile
- Method Pdf417Code.TryDecodePngFile
- Method Pdf417Code.TryDecodePngFile
- Method Pdf417Code.TryDecodePngFile
- Method Pdf417Code.TryDecodePngFile
- Method Pdf417Code.TryDecodePngFile
- Method QR.TryDecodeAllImage
- Method QR.TryDecodeAllImage
- Method QR.TryDecodeAllImage
- Method QR.TryDecodeAllImage
- Method QR.TryDecodeAllPng
- Method QR.TryDecodeAllPng
- Method QR.TryDecodeAllPngFile
- Method QR.TryDecodeAllPngFile
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodeImage
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePng
- Method QR.TryDecodePngFile
- Method QR.TryDecodePngFile
- Method QR.TryDecodePngFile
- Method QR.TryDecodePngFile
- Method QrImageDecoder.DecodeImageBatch
- Method QrImageDecoder.DecodeImageResult
- Method QrImageDecoder.DecodeImageResult
- Method QrImageDecoder.DecodeImageResult
- Method QrImageDecoder.TryDecodeAllImage
- Method QrImageDecoder.TryDecodeAllImage
- Method QrImageDecoder.TryDecodeAllImage
- Method QrImageDecoder.TryDecodeAllImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method QrImageDecoder.TryDecodeImage
- Method ImageReader.DecodeAnimationCanvasFrames
- Method ImageReader.DecodeAnimationCanvasFrames
- Method ImageReader.DecodeAnimationCanvasFrames
- Method ImageReader.DecodeAnimationFrames
- Method ImageReader.DecodeAnimationFrames
- Method ImageReader.DecodeAnimationFrames
- Method ImageReader.DecodeRgba32
- Method ImageReader.DecodeRgba32
- Method ImageReader.DecodeRgba32
- Method ImageReader.DecodeRgba32Composite
- Method ImageReader.DecodeRgba32Composite
- Method ImageReader.DecodeRgba32Composite
- Method ImageReader.TryDecodeAnimationCanvasFrames
- Method ImageReader.TryDecodeAnimationFrames
- Method ImageReader.TryDecodeRgba32
- Method ImageReader.TryDecodeRgba32
- Method ImageReader.TryDecodeRgba32
- Method ImageReader.TryDecodeRgba32Composite
- Method ImageReader.TryDecodeRgba32Composite
- Method ImageReader.TryDecodeRgba32Composite
Constructors
public ImageDecodeOptions() #Methods
public static ImageDecodeOptions Guarded(Int32 maxBytes = 67108864, Int64 maxPixels = 20000000, Int32 maxAnimationFrames = 120, Int32 maxAnimationDurationMs = 60000, Int64 maxAnimationFramePixels = 20000000, Int32 maxDimension = 0) #ImageDecodeOptionsGuarded preset for untrusted images (caps bytes, pixels, and animation limits).
Parameters
- maxBytes System.Int32 = 67108864
- maxPixels System.Int64 = 20000000
- maxAnimationFrames System.Int32 = 120
- maxAnimationDurationMs System.Int32 = 60000
- maxAnimationFramePixels System.Int64 = 20000000
- maxDimension System.Int32 = 0
public static ImageDecodeOptions Screen(Int32 recognitionBudgetMilliseconds = 300, Int32 maxDimension = 1200) #ImageDecodeOptionsScreen preset (budgeted decode for UI capture scenarios).
Parameters
- recognitionBudgetMilliseconds System.Int32 = 300
- maxDimension System.Int32 = 1200
public static ImageDecodeOptions Strict(Int32 maxBytes = 8388608, Int64 maxPixels = 8000000, Int32 maxAnimationFrames = 60, Int32 maxAnimationDurationMs = 15000, Int64 maxAnimationFramePixels = 8000000, Int32 maxDimension = 0) #ImageDecodeOptionsStrict preset for untrusted images (tighter caps for hostile inputs).
Parameters
- maxBytes System.Int32 = 8388608
- maxPixels System.Int64 = 8000000
- maxAnimationFrames System.Int32 = 60
- maxAnimationDurationMs System.Int32 = 15000
- maxAnimationFramePixels System.Int64 = 8000000
- maxDimension System.Int32 = 0
public ImageDecodeOptions WithJpegOptions(JpegDecodeOptions options) #ImageDecodeOptionsSets JPEG decoding options.
Parameters
- options CodeGlyphX.Rendering.Jpeg.JpegDecodeOptions
Examples
var options = new ImageDecodeOptions()
.WithJpegOptions(highQualityChroma: true, allowTruncated: true);
public ImageDecodeOptions WithJpegOptions(Boolean highQualityChroma = false, Boolean allowTruncated = false) #ImageDecodeOptionsSets JPEG decoding options.
Parameters
- highQualityChroma System.Boolean = false
- allowTruncated System.Boolean = false
Examples
var options = new ImageDecodeOptions()
.WithJpegOptions(highQualityChroma: true);
public ImageDecodeOptions WithMaxAnimationDurationMs(Int32 maxDurationMs) #ImageDecodeOptionsSets the maximum total animation duration (milliseconds) allowed for decoding.
Parameters
- maxDurationMs System.Int32
public ImageDecodeOptions WithMaxAnimationFramePixels(Int64 maxPixels) #ImageDecodeOptionsSets the maximum pixel count allowed per animation frame.
Parameters
- maxPixels System.Int64
public ImageDecodeOptions WithMaxAnimationFrames(Int32 maxFrames) #ImageDecodeOptionsSets the maximum animation frame count allowed for decoding.
Parameters
- maxFrames System.Int32
public ImageDecodeOptions WithMaxBytes(Int32 maxBytes) #ImageDecodeOptionsSets the maximum input size in bytes for decoding.
Parameters
- maxBytes System.Int32
public ImageDecodeOptions WithMaxDimension(Int32 maxDimension) #ImageDecodeOptionsSets maximum image dimension (pixels) for decoding.
Parameters
- maxDimension System.Int32
public ImageDecodeOptions WithMaxPixels(Int64 maxPixels) #ImageDecodeOptionsSets the maximum pixel count allowed for decoding.
Parameters
- maxPixels System.Int64
public ImageDecodeOptions WithRecognitionBudget(Int32 milliseconds) #ImageDecodeOptionsSets the cooperative symbol-recognition budget. Raster image decoding itself is not timed.
Parameters
- milliseconds System.Int32
public ImageDecodeOptions WithRecognitionBudget(Int32 milliseconds, Int32 maxDimension) #ImageDecodeOptionsSets the symbol-recognition time budget and maximum output dimension in one call.
Parameters
- milliseconds System.Int32
- maxDimension System.Int32
Inherited Methods
Properties
public Int32 MaxDimension { get; set; } #Maximum output dimension, in pixels, for single-image decoding and symbol recognition. Raster codecs validate the original image against MaxPixels first, then resize the decoded RGBA output. Symbol recognition uses only that resized output and does not retry at the original resolution. This setting does not reduce codec memory use. Set to 0 to keep the original dimensions.
public Nullable<Int64> MaxPixels { get; set; } #Maximum pixel count allowed for decoding (width * height). null uses MaxPixels; 0 disables this limit.
public Nullable<Int32> MaxBytes { get; set; } #Maximum input size in bytes for decoding. null uses MaxImageBytes; 0 disables this limit.
public Int32 RecognitionBudgetMilliseconds { get; set; } #Cooperative time budget, in milliseconds, for barcode and matrix recognition after raster decoding. Image codecs do not use this value. Multi-format CodeGlyph entry points apply the budget to each candidate decoder rather than to the complete candidate sequence. Set to 0 to disable the recognition budget.
public Nullable<Int32> MaxAnimationFrames { get; set; } #Maximum animation frame count allowed for decoding. null uses MaxAnimationFrames; 0 disables this limit.
public Nullable<Int32> MaxAnimationDurationMs { get; set; } #Maximum total animation duration, in milliseconds, allowed for decoding. null uses MaxAnimationDurationMs; 0 disables this limit.
public Nullable<Int64> MaxAnimationFramePixels { get; set; } #Maximum pixel count allowed per animation frame. null uses MaxAnimationFramePixels; 0 disables this limit.
public Nullable<JpegDecodeOptions> JpegOptions { get; set; } #Optional JPEG decoding options (chroma upsampling, truncated handling).