Skip to content

,System.Nullable{System.Single},System.Nullable{System.Single})} ,System.Nullable{System.Single},System.Nullable{System.Single},System.Threading.CancellationToken)}

SkiaBitmapLoader.LoadFromMemory(ReadOnlyMemory, float?, float?) method

Defined in

Type: SkiaBitmapLoader Namespace: Splat.SkiaSharp Assembly: Splat.SkiaSharp.dll

Applies to

net11.0, net10.0

Overloads

  1. public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight)

  2. public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight, CancellationToken cancellationToken)

1. Overload

public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight)

View source

Summary: Decodes an encoded image from memory, applying the requested size and recorded orientation.

Parameters

NameTypeDescription
sourceReadOnlyMemoryThe encoded image. The memory is only used during this call.
desiredWidthfloat?The desired width, or null to leave it unconstrained.
desiredHeightfloat?The desired height, or null to leave it unconstrained.

Returns: IBitmap? -- The decoded bitmap, or null when the memory does not contain a recognised image.

2. Overload

public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight, CancellationToken cancellationToken)

View source

Summary: Decodes an encoded image from memory, applying the requested size and recorded orientation.

Parameters

NameTypeDescription
sourceReadOnlyMemoryThe encoded image. The memory is only used during this call.
desiredWidthfloat?The desired width, or null to leave it unconstrained.
desiredHeightfloat?The desired height, or null to leave it unconstrained.
cancellationTokenCancellationTokenCancellation checked between native image operations; an operation in progress cannot be interrupted.

Returns: IBitmap? -- The decoded bitmap, or null when the memory does not contain a recognised image.