OfficeImageOptimizationRequest
OfficeIMO.Drawing
Placement-derived policy for resizing and re-encoding an image.
Inheritance
- object
- OfficeImageOptimizationRequest
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters 1
Constructors
public OfficeImageOptimizationRequest(int targetPixelWidth, int targetPixelHeight) #Creates an optimization request for a target pixel bounding box.
Parameters
- targetPixelWidth int
- targetPixelHeight int
Inherited Methods
Properties
public OfficeImageOptimizationMode Mode { get; set; } #Optimization mode. Downsample preserves the existing no-unnecessary-rewrite behavior.
public CancellationToken CancellationToken { get; set; } #Cancellation observed during decoding, resampling, and encoding.
public int TargetPixelWidth { get; set; } #Maximum required output width in pixels.
public int TargetPixelHeight { get; set; } #Maximum required output height in pixels.
public bool AllowUpscaling { get; set; } #Allows enlarging source pixels when the placement is larger than the source.
public bool PreserveAspectRatio { get; set; } #Preserves the source aspect ratio within the requested pixel bounds.
public OfficeRasterResamplingMode ResamplingMode { get; set; } #Sampling mode used when dimensions change.
public OfficeRasterResamplingColorSpace ResamplingColorSpace { get; set; } #Color space used while filtering resized pixels.
public OfficeImageFormat? OutputFormat { get; set; } #Optional PNG, JPEG, TIFF, or WebP output override. Null preserves JPEG and otherwise emits PNG.
public double? OutputDpiX { get; set; } #Optional horizontal output resolution. Null preserves source DPI. Values outside the selected destination format's metadata range are clamped to its nearest representable limit.
public double? OutputDpiY { get; set; } #Optional vertical output resolution. Null preserves source DPI. Values outside the selected destination format's metadata range are clamped to its nearest representable limit.
public OfficePngCompression PngCompression { get; set; } #PNG compression used when optimized output is PNG.
public OfficeJpegSubsampling JpegSubsampling { get; set; } #JPEG chroma subsampling used for optimized output.
public bool JpegProgressive { get; set; } #Writes progressive JPEG scans when optimized output is JPEG.
public bool JpegOptimizeHuffman { get; set; } #Builds image-specific Huffman tables when optimized output is JPEG.
public OfficeColor JpegBackground { get; set; } #Background used when explicit JPEG output flattens alpha.
public OfficeTiffCompression TiffCompression { get; set; } #TIFF strip compression used when optimized output is TIFF.
public OfficeTiffPredictor TiffPredictor { get; set; } #TIFF predictor applied when the selected compression supports it.
public bool KeepOriginalWhenNotSmaller { get; set; } #Keeps original bytes when the candidate would be the same size or larger.
public OfficeImageMetadataPolicy MetadataPolicy { get; set; } #Metadata behavior used when new image bytes are encoded.
public OfficeImageMetadataKinds MetadataSelection { get; set; } #Source categories copied when OfficeImageOptimizationRequest.MetadataPolicy is selective.