Class SKImage
Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll
public sealed class SKImage : IDisposable
Inheritance
Implements
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
Width
public int Width { get; }
Property Value
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
Encode()
public SKData Encode()
Returns
Encode(Span<byte>, out int)
public bool Encode(Span<byte> destination, out int bytesWritten)
Parameters
bytesWritten int
Returns
Encode(SKEncodedImageFormat, Span<byte>, out int)
public bool Encode(SKEncodedImageFormat format, Span<byte> destination, out int bytesWritten)
Parameters
format SKEncodedImageFormat
bytesWritten int
Returns
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
bytesWritten int
Returns
~SKImage()
protected ~SKImage()
FromBitmap(SKBitmap)
public static SKImage? FromBitmap(SKBitmap bitmap)
Parameters
bitmap SKBitmap
Returns
FromEncodedData(SKData)
public static SKImage? FromEncodedData(SKData data)
Parameters
data SKData
Returns
FromPicture(SKPicture, SKSizeI, SKMatrix?)
public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix? matrix = null)
Parameters
picture SKPicture
dimensions SKSizeI
matrix SKMatrix?
Returns
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
FromPixels(SKImageInfo, nint, int)
public static SKImage FromPixels(SKImageInfo info, nint pixels, int rowBytes)
Parameters
info SKImageInfo
pixels nint
rowBytes int
Returns
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
ScalePixels(SKPixmap, SKSamplingOptions)
public bool ScalePixels(SKPixmap destination, SKSamplingOptions samplingOptions)
Parameters
destination SKPixmap
samplingOptions SKSamplingOptions
Returns
ScalePixels(SKPixmap, SKSamplingOptions, SKImageCachingHint)
public bool ScalePixels(SKPixmap destination, SKSamplingOptions samplingOptions, SKImageCachingHint cachingHint)
Parameters
destination SKPixmap
samplingOptions SKSamplingOptions
cachingHint SKImageCachingHint
Returns
ScalePixels(SKPixmap, SKFilterQuality)
public bool ScalePixels(SKPixmap destination, SKFilterQuality quality)
Parameters
destination SKPixmap
quality SKFilterQuality
Returns
ScalePixels(SKPixmap, SKFilterQuality, SKImageCachingHint)
public bool ScalePixels(SKPixmap destination, SKFilterQuality quality, SKImageCachingHint cachingHint)
Parameters
destination SKPixmap
quality SKFilterQuality
cachingHint SKImageCachingHint
Returns
ToRasterImage()
public SKImage ToRasterImage()
Returns
ToRasterImage(bool)
public SKImage ToRasterImage(bool cachingHint)
Parameters
cachingHint bool
Returns
ToShader()
public SKShader ToShader()
Returns
ToShader(SKShaderTileMode, SKShaderTileMode)
public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY)
Parameters
tileModeX SKShaderTileMode
tileModeY SKShaderTileMode
Returns
ToShader(SKShaderTileMode, SKShaderTileMode, SKMatrix)
public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKMatrix localMatrix)
Parameters
tileModeX SKShaderTileMode
tileModeY SKShaderTileMode
localMatrix SKMatrix
Returns
ToShader(SKShaderTileMode, SKShaderTileMode, SKSamplingOptions)
public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKSamplingOptions sampling)
Parameters
tileModeX SKShaderTileMode
tileModeY SKShaderTileMode
sampling SKSamplingOptions
Returns
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
ToShader(SKShaderTileMode, SKShaderTileMode, SKFilterQuality)
public SKShader ToShader(SKShaderTileMode tileModeX, SKShaderTileMode tileModeY, SKFilterQuality quality)
Parameters
tileModeX SKShaderTileMode
tileModeY SKShaderTileMode
quality SKFilterQuality
Returns
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
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