Skip to main content

Class SKImage

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public sealed class SKImage : IDisposable

Inheritance​

object ← SKImage

Implements​

IDisposable

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties​

Height​

public int Height { get; }

Property Value​

int

Width​

public int Width { get; }

Property Value​

int

Methods​

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Encode(SKEncodedImageFormat, int)​

public SKData Encode(SKEncodedImageFormat format, int quality)

Parameters​

format SKEncodedImageFormat

quality int

Returns​

SKData

Encode()​

public SKData Encode()

Returns​

SKData

Encode(Span<byte>, out int)​

public bool Encode(Span<byte> destination, out int bytesWritten)

Parameters​

destination Span<byte>

bytesWritten int

Returns​

bool

Encode(SKEncodedImageFormat, Span<byte>, out int)​

public bool Encode(SKEncodedImageFormat format, Span<byte> destination, out int bytesWritten)

Parameters​

format SKEncodedImageFormat

destination Span<byte>

bytesWritten int

Returns​

bool

Encode(SKEncodedImageFormat, int, Span<byte>, out int)​

public bool Encode(SKEncodedImageFormat format, int quality, Span<byte> destination, out int bytesWritten)

Parameters​

format SKEncodedImageFormat

quality int

destination Span<byte>

bytesWritten int

Returns​

bool

~SKImage()​

protected ~SKImage()

FromBitmap(SKBitmap)​

public static SKImage? FromBitmap(SKBitmap bitmap)

Parameters​

bitmap SKBitmap

Returns​

SKImage?

FromEncodedData(SKData)​

public static SKImage? FromEncodedData(SKData data)

Parameters​

data SKData

Returns​

SKImage?

FromPicture(SKPicture, SKSizeI, SKMatrix?)​

public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix? matrix = null)

Parameters​

picture SKPicture

dimensions SKSizeI

matrix SKMatrix?

Returns​

SKImage

FromPixels(SKImageInfo, ReadOnlySpan<byte>, int)​

public static SKImage FromPixels(SKImageInfo info, ReadOnlySpan<byte> pixels, int rowBytes)

Parameters​

info SKImageInfo

pixels ReadOnlySpan<byte>

rowBytes int

Returns​

SKImage

FromPixels(SKImageInfo, nint, int)​

public static SKImage FromPixels(SKImageInfo info, nint pixels, int rowBytes)

Parameters​

info SKImageInfo

pixels nint

rowBytes int

Returns​

SKImage

ReadPixels(SKImageInfo, nint, int, int, int, SKImageCachingHint)​

public bool ReadPixels(SKImageInfo info, nint pixels, int rowBytes, int srcX, int srcY, SKImageCachingHint cachingHint)

Parameters​

info SKImageInfo

pixels nint

rowBytes int

srcX int

srcY int

cachingHint SKImageCachingHint

Returns​

bool

ScalePixels(SKPixmap, SKSamplingOptions)​

public bool ScalePixels(SKPixmap destination, SKSamplingOptions samplingOptions)

Parameters​

destination SKPixmap

samplingOptions SKSamplingOptions

Returns​

bool

ScalePixels(SKPixmap, SKSamplingOptions, SKImageCachingHint)​

public bool ScalePixels(SKPixmap destination, SKSamplingOptions samplingOptions, SKImageCachingHint cachingHint)

Parameters​

destination SKPixmap

samplingOptions SKSamplingOptions

cachingHint SKImageCachingHint

Returns​

bool

ScalePixels(SKPixmap, SKFilterQuality)​

public bool ScalePixels(SKPixmap destination, SKFilterQuality quality)

Parameters​

destination SKPixmap

quality SKFilterQuality

Returns​

bool

ScalePixels(SKPixmap, SKFilterQuality, SKImageCachingHint)​

public bool ScalePixels(SKPixmap destination, SKFilterQuality quality, SKImageCachingHint cachingHint)

Parameters​

destination SKPixmap

quality SKFilterQuality

cachingHint SKImageCachingHint

Returns​

bool

ToRasterImage()​

public SKImage ToRasterImage()

Returns​

SKImage

ToRasterImage(bool)​

public SKImage ToRasterImage(bool cachingHint)

Parameters​

cachingHint bool

Returns​

SKImage

ToShader()​

public SKShader ToShader()

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKMatrix)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKMatrix localMatrix)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

localMatrix SKMatrix

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKSamplingOptions)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKSamplingOptions sampling)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

sampling SKSamplingOptions

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKSamplingOptions, SKMatrix)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKSamplingOptions sampling, SKMatrix localMatrix)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

sampling SKSamplingOptions

localMatrix SKMatrix

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKFilterQuality)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKFilterQuality quality)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

quality SKFilterQuality

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKFilterQuality, SKMatrix)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKFilterQuality quality, SKMatrix localMatrix)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

quality SKFilterQuality

localMatrix SKMatrix

Returns​

SKShader

ToShader(SKShaderTileMode, SKShaderTileMode, SKSamplingOptions, SKMatrix, SKRect)​

public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKSamplingOptions sampling, SKMatrix localMatrix, SKRect tileRect)

Parameters​

tileModeX SKShaderTileMode

tileModeY SKShaderTileMode

sampling SKSamplingOptions

localMatrix SKMatrix

tileRect SKRect

Returns​

SKShader