Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeImageOptimizationRequest

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

Placement-derived policy for resizing and re-encoding an image.

Inheritance

  • Object
  • OfficeImageOptimizationRequest

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 OfficeImageOptimizationRequest(Int32 targetPixelWidth, Int32 targetPixelHeight) #

Creates an optimization request for a target pixel bounding box.

Parameters

targetPixelWidth System.Int32 requiredposition: 0
targetPixelHeight System.Int32 requiredposition: 1

Properties

public Int32 TargetPixelWidth { get; set; } #

Maximum required output width in pixels.

public Int32 TargetPixelHeight { get; set; } #

Maximum required output height in pixels.

public Boolean AllowUpscaling { get; set; } #

Allows enlarging source pixels when the placement is larger than the source.

public Boolean 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 Nullable<OfficeImageFormat> OutputFormat { get; set; } #

Optional PNG, JPEG, TIFF, or WebP output override. Null preserves JPEG and otherwise emits PNG.

public Nullable<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 Nullable<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 Int32 JpegQuality { get; set; } #

JPEG quality from 1 through 100.

public OfficeJpegSubsampling JpegSubsampling { get; set; } #

JPEG chroma subsampling used for optimized output.

public Boolean JpegProgressive { get; set; } #

Writes progressive JPEG scans when optimized output is JPEG.

public Boolean 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 Boolean 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 MetadataPolicy is selective.