API Reference
OfficeRasterTransforms
Reusable geometric edits of managed raster pixels. Every operation returns independent pixels.
Inheritance
- Object
- OfficeRasterTransforms
Methods
public static OfficeRasterImage AutoOrient(OfficeRasterImage source, Int32 orientation, CancellationToken cancellationToken = default) #OfficeRasterImageApplies an EXIF orientation value, including mirrored orientations.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- orientation System.Int32
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Crop(OfficeRasterImage source, Int32 x, Int32 y, Int32 width, Int32 height, CancellationToken cancellationToken = default) #OfficeRasterImageCrops an exact in-bounds rectangular pixel region.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- x System.Int32
- y System.Int32
- width System.Int32
- height System.Int32
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Flip(OfficeRasterImage source, Boolean horizontal, Boolean vertical, CancellationToken cancellationToken = default) #OfficeRasterImageMirrors an image horizontally, vertically, or along both axes.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- horizontal System.Boolean
- vertical System.Boolean
- cancellationToken System.Threading.CancellationToken = default
public static ValueTuple<Int32, Int32> GetRotatedSize(OfficeRasterImage source, Double degrees) #ValueTuple<Int32, Int32>Plans the exact canvas dimensions produced by a clockwise rotation without allocating pixels.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- degrees System.Double
public static ValueTuple<Int32, Int32> GetSkewedSize(OfficeRasterImage source, Double degreesX, Double degreesY) #ValueTuple<Int32, Int32>Plans the exact expanded canvas dimensions produced by a skew without allocating pixels.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- degreesX System.Double
- degreesY System.Double
public static OfficeRasterImage MaskEllipse(OfficeRasterImage source, Double x, Double y, Double width, Double height, CancellationToken cancellationToken = default) #OfficeRasterImageKeeps pixels inside an antialiased ellipse and clears pixels outside it.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage MaskPolygon(OfficeRasterImage source, IReadOnlyList<OfficePoint> points, CancellationToken cancellationToken = default) #OfficeRasterImageKeeps pixels inside an antialiased polygon.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage MaskRoundedRectangle(OfficeRasterImage source, Double radius, CancellationToken cancellationToken = default) #OfficeRasterImageClears pixels outside the rounded corners of the image canvas.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- radius System.Double
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Rotate(OfficeRasterImage source, Double degrees, Nullable<OfficeColor> background = null, CancellationToken cancellationToken = default) #OfficeRasterImageRotates clockwise and expands the canvas to retain the entire source.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- degrees System.Double
- background System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeRasterImage Skew(OfficeRasterImage source, Double degreesX, Double degreesY, Nullable<OfficeColor> background = null, CancellationToken cancellationToken = default) #OfficeRasterImageSkews each axis by its angle in degrees and expands the canvas to retain all pixels.
Parameters
- source OfficeIMO.Drawing.OfficeRasterImage
- degreesX System.Double
- degreesY System.Double
- background System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- cancellationToken System.Threading.CancellationToken = default