API Reference
OfficeImageOptimizationRequest
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(Int32 targetPixelWidth, Int32 targetPixelHeight) #Creates an optimization request for a target pixel bounding box.
Parameters
- targetPixelWidth System.Int32
- targetPixelHeight System.Int32
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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 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 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 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 OfficeImageOptimizationRequest.MetadataPolicy is selective.