API Reference
OfficeRasterResampler
Dependency-free RGBA image resampling shared by document renderers.
Inheritance
- Object
- OfficeRasterResampler
Methods
public static Int64 GetResizeWorkingSetBytes(Int32 sourceWidth, Int32 sourceHeight, Int32 width, Int32 height, OfficeRasterResamplingMode mode = Bilinear, CancellationToken cancellationToken = default) #Int64Plans the managed working-set bytes required to resize an image without allocating its pixel buffers.
Parameters
- sourceWidth System.Int32
- Source width in pixels.
- sourceHeight System.Int32
- Source height in pixels.
- width System.Int32
- Destination width in pixels.
- height System.Int32
- Destination height in pixels.
- mode OfficeIMO.Drawing.OfficeRasterResamplingMode = Bilinear
- The sampling kernel used by the resize operation.
- cancellationToken System.Threading.CancellationToken = default
- Observes cancellation during contribution planning.
Returns
The planned managed working-set bytes for this operation.
public static OfficeRasterResizePlan PlanResize(Int32 sourceWidth, Int32 sourceHeight, OfficeRasterResizeOptions options, CancellationToken cancellationToken = default) #OfficeRasterResizePlanCaptures fit, pixel rounding, crop and peak storage before allocating raster pixels.
Parameters
- sourceWidth System.Int32
- sourceHeight System.Int32
- options OfficeIMO.Drawing.OfficeRasterResizeOptions
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Resize(OfficeRasterImage source, Int32 width, Int32 height, OfficeRasterResamplingMode mode = Bilinear) #OfficeRasterImageResizes an RGBA image to exact pixel dimensions.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- width System.Int32
- height System.Int32
- mode OfficeIMO.Drawing.OfficeRasterResamplingMode = Bilinear
public static OfficeRasterImage Resize(OfficeRasterImage source, Int32 width, Int32 height, OfficeRasterResamplingMode mode, OfficeRasterResamplingColorSpace colorSpace) #OfficeRasterImageResizes an RGBA image to exact pixel dimensions using an explicit filtering color space.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- width System.Int32
- height System.Int32
- mode OfficeIMO.Drawing.OfficeRasterResamplingMode
- colorSpace OfficeIMO.Drawing.OfficeRasterResamplingColorSpace
public static OfficeRasterImage Resize(OfficeRasterImage source, Int32 width, Int32 height, OfficeRasterResamplingMode mode, OfficeRasterResamplingColorSpace colorSpace, CancellationToken cancellationToken) #OfficeRasterImageResizes an image while observing cancellation during contribution planning and pixel filtering.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- width System.Int32
- height System.Int32
- mode OfficeIMO.Drawing.OfficeRasterResamplingMode
- colorSpace OfficeIMO.Drawing.OfficeRasterResamplingColorSpace
- cancellationToken System.Threading.CancellationToken
public static OfficeRasterImage Resize(OfficeRasterImage source, OfficeRasterResizeOptions options, CancellationToken cancellationToken = default) #OfficeRasterImageReturns independently resized pixels using requested fit bounds and sampling.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- options OfficeIMO.Drawing.OfficeRasterResizeOptions
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Resize(OfficeRasterImage source, OfficeRasterResizePlan plan, CancellationToken cancellationToken = default) #OfficeRasterImageExecutes an immutable resize plan against its required source dimensions, without modifying the source.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- plan OfficeIMO.Drawing.OfficeRasterResizePlan
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Transform(OfficeRasterImage source, OfficeTransform sourceToDestination, Int32 width, Int32 height, OfficeColor? background = null, CancellationToken cancellationToken = default) #OfficeRasterImageResamples an affine-transformed image into a bounded canvas, filling uncovered pixels with the background.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- sourceToDestination OfficeIMO.Drawing.OfficeTransform
- width System.Int32
- height System.Int32
- background OfficeIMO.Drawing.OfficeColor? = null
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?