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.Safe
- Method ImageDecodeOptions.Screen
- Method ImageDecodeOptions.UltraSafe
- Method ImageDecodeOptions.WithBudget
- Method ImageDecodeOptions.WithJpegOptions
- Method ImageDecodeOptions.WithJpegOptions
- Method ImageDecodeOptions.WithMaxAnimationDurationMs
- Method ImageDecodeOptions.WithMaxAnimationFramePixels
- Method ImageDecodeOptions.WithMaxAnimationFrames
- Method ImageDecodeOptions.WithMaxBytes
- Method ImageDecodeOptions.WithMaxDimension
- Method ImageDecodeOptions.WithMaxMilliseconds
- Method ImageDecodeOptions.WithMaxPixels
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.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- Method DataMatrixCode.TryDecodePngFile
- 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.TryDecodeAllPng
- Method QR.TryDecodeAllPng
- Method QR.TryDecodeAllPng
- Method QR.TryDecodeAllPng
- Method QR.TryDecodeAllPngFile
- Method QR.TryDecodeAllPngFile
- 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 Safe(Int32 maxBytes = 67108864, Int64 maxPixels = 20000000, Int32 maxAnimationFrames = 120, Int32 maxAnimationDurationMs = 60000, Int64 maxAnimationFramePixels = 20000000, Int32 maxDimension = 0) #ImageDecodeOptionsSafe 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 maxMilliseconds = 300, Int32 maxDimension = 1200) #ImageDecodeOptionsScreen preset (budgeted decode for UI capture scenarios).
Parameters
- maxMilliseconds System.Int32 = 300
- maxDimension System.Int32 = 1200
public static ImageDecodeOptions UltraSafe(Int32 maxBytes = 8388608, Int64 maxPixels = 8000000, Int32 maxAnimationFrames = 60, Int32 maxAnimationDurationMs = 15000, Int64 maxAnimationFramePixels = 8000000, Int32 maxDimension = 0) #ImageDecodeOptionsUltra-safe 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 WithBudget(Int32 maxMilliseconds, Int32 maxDimension = 0) #ImageDecodeOptionsSets the time+dimension budget in one call.
Parameters
- maxMilliseconds System.Int32
- 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 WithMaxMilliseconds(Int32 maxMilliseconds) #ImageDecodeOptionsSets the maximum decode time budget (milliseconds).
Parameters
- maxMilliseconds System.Int32
public ImageDecodeOptions WithMaxPixels(Int64 maxPixels) #ImageDecodeOptionsSets the maximum pixel count allowed for decoding.
Parameters
- maxPixels System.Int64
Inherited Methods
Properties
public Int32 MaxDimension { get; set; } #Maximum image dimension (pixels) for decoding. Larger inputs will be downscaled. Set to 0 to disable.
public Int64 MaxPixels { get; set; } #Maximum pixel count allowed for decoding (width * height). Set to 0 to disable.
public Int32 MaxBytes { get; set; } #Maximum input size in bytes for decoding. Set to 0 to disable.
public Int32 MaxMilliseconds { get; set; } #Maximum milliseconds to spend decoding (best effort). Set to 0 to disable.
public Int32 MaxAnimationFrames { get; set; } #Maximum animation frame count allowed for decoding. Set to 0 to use global defaults.
public Int32 MaxAnimationDurationMs { get; set; } #Maximum total animation duration (milliseconds) allowed for decoding. Set to 0 to use global defaults.
public Int64 MaxAnimationFramePixels { get; set; } #Maximum pixel count allowed per animation frame. Set to 0 to use global defaults.
public Nullable<JpegDecodeOptions> JpegOptions { get; set; } #Optional JPEG decoding options (chroma upsampling, truncated handling).