Share via


SkiaImage.Resize(Single, Single, ResizeMode, Boolean) Method

Definition

Creates a new image by resizing this image to the specified dimensions.

public Microsoft.Maui.Graphics.IImage Resize(float width, float height, Microsoft.Maui.Graphics.ResizeMode resizeMode = Microsoft.Maui.Graphics.ResizeMode.Fit, bool disposeOriginal = false);
abstract member Resize : single * single * Microsoft.Maui.Graphics.ResizeMode * bool -> Microsoft.Maui.Graphics.IImage
override this.Resize : single * single * Microsoft.Maui.Graphics.ResizeMode * bool -> Microsoft.Maui.Graphics.IImage
Public Function Resize (width As Single, height As Single, Optional resizeMode As ResizeMode = Microsoft.Maui.Graphics.ResizeMode.Fit, Optional disposeOriginal As Boolean = false) As IImage

Parameters

width
Single

The width of the resulting image.

height
Single

The height of the resulting image.

resizeMode
ResizeMode

The mode to use when resizing the image.

disposeOriginal
Boolean

Whether to dispose the original image after resizing.

Returns

A new image instance with the specified dimensions.

Implements

Applies to