Skip to main content

Class SKBitmap

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

public sealed class SKBitmap : IDisposable

Inheritance​

object ← SKBitmap

Implements​

IDisposable

Inherited Members​

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

Constructors​

SKBitmap()​

public SKBitmap()

SKBitmap(SKImageInfo)​

public SKBitmap(SKImageInfo info)

Parameters​

info SKImageInfo

SKBitmap(int, int)​

public SKBitmap(int width, int height)

Parameters​

width int

height int

Properties​

AlphaType​

public SKAlphaType AlphaType { get; }

Property Value​

SKAlphaType

ColorType​

public SKColorType ColorType { get; }

Property Value​

SKColorType

Height​

public int Height { get; }

Property Value​

int

Info​

public SKImageInfo Info { get; }

Property Value​

SKImageInfo

IsEmpty​

public bool IsEmpty { get; }

Property Value​

bool

IsImmutable​

public bool IsImmutable { get; }

Property Value​

bool

RowBytes​

public int RowBytes { get; }

Property Value​

int

Width​

public int Width { get; }

Property Value​

int

Methods​

CanCopyTo(SKColorType)​

public bool CanCopyTo(SKColorType colorType)

Parameters​

colorType SKColorType

Returns​

bool

Copy()​

public SKBitmap Copy()

Returns​

SKBitmap

Decode(SKData)​

public static SKBitmap? Decode(SKData data)

Parameters​

data SKData

Returns​

SKBitmap?

Decode(SKManagedStream)​

public static SKBitmap? Decode(SKManagedStream stream)

Parameters​

stream SKManagedStream

Returns​

SKBitmap?

Decode(Stream)​

public static SKBitmap? Decode(Stream stream)

Parameters​

stream Stream

Returns​

SKBitmap?

Decode(SKCodec, SKImageInfo)​

public static SKBitmap Decode(SKCodec codec, SKImageInfo desired)

Parameters​

codec SKCodec

desired SKImageInfo

Returns​

SKBitmap

Dispose()​

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

public void Dispose()

Erase(SKColor)​

public void Erase(SKColor color)

Parameters​

color SKColor

GetPixels()​

public nint GetPixels()

Returns​

nint

InstallPixels(SKImageInfo, nint, int)​

public void InstallPixels(SKImageInfo info, nint address, int rowBytes)

Parameters​

info SKImageInfo

address nint

rowBytes int

InstallPixels(SKImageInfo, nint, int, SKBitmapReleaseDelegate?, object?)​

public void InstallPixels(SKImageInfo info, nint address, int rowBytes, SKBitmapReleaseDelegate? releaseProc, object? context)

Parameters​

info SKImageInfo

address nint

rowBytes int

releaseProc SKBitmapReleaseDelegate?

context object?

NotifyPixelsChanged()​

public void NotifyPixelsChanged()

PeekPixels()​

public SKPixmap PeekPixels()

Returns​

SKPixmap

Resize(SKImageInfo, SKSamplingOptions)​

public SKBitmap Resize(SKImageInfo info, SKSamplingOptions options)

Parameters​

info SKImageInfo

options SKSamplingOptions

Returns​

SKBitmap

Resize(SKImageInfo, SKFilterQuality)​

public SKBitmap Resize(SKImageInfo info, SKFilterQuality quality)

Parameters​

info SKImageInfo

quality SKFilterQuality

Returns​

SKBitmap

Resize(SKSizeI, SKSamplingOptions)​

public SKBitmap Resize(SKSizeI size, SKSamplingOptions options)

Parameters​

size SKSizeI

options SKSamplingOptions

Returns​

SKBitmap

Resize(SKSizeI, SKFilterQuality)​

public SKBitmap Resize(SKSizeI size, SKFilterQuality quality)

Parameters​

size SKSizeI

quality SKFilterQuality

Returns​

SKBitmap

ScalePixels(SKBitmap, SKSamplingOptions)​

public bool ScalePixels(SKBitmap destination, SKSamplingOptions options)

Parameters​

destination SKBitmap

options SKSamplingOptions

Returns​

bool

ScalePixels(SKBitmap, SKFilterQuality)​

public bool ScalePixels(SKBitmap destination, SKFilterQuality quality)

Parameters​

destination SKBitmap

quality SKFilterQuality

Returns​

bool

ScalePixels(SKPixmap, SKSamplingOptions)​

public bool ScalePixels(SKPixmap destination, SKSamplingOptions options)

Parameters​

destination SKPixmap

options SKSamplingOptions

Returns​

bool

ScalePixels(SKPixmap, SKFilterQuality)​

public bool ScalePixels(SKPixmap destination, SKFilterQuality quality)

Parameters​

destination SKPixmap

quality SKFilterQuality

Returns​

bool

SetImmutable()​

public void SetImmutable()