,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¶
-
public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight) -
public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight, CancellationToken cancellationToken)
1. Overload¶
public IBitmap? LoadFromMemory(ReadOnlyMemory<byte> source, float? desiredWidth, float? desiredHeight)
Summary: Decodes an encoded image from memory, applying the requested size and recorded orientation.
Parameters
| Name | Type | Description |
|---|---|---|
source | ReadOnlyMemory | The encoded image. The memory is only used during this call. |
desiredWidth | float? | The desired width, or null to leave it unconstrained. |
desiredHeight | float? | 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)
Summary: Decodes an encoded image from memory, applying the requested size and recorded orientation.
Parameters
| Name | Type | Description |
|---|---|---|
source | ReadOnlyMemory | The encoded image. The memory is only used during this call. |
desiredWidth | float? | The desired width, or null to leave it unconstrained. |
desiredHeight | float? | The desired height, or null to leave it unconstrained. |
cancellationToken | CancellationToken | Cancellation 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.