,System.Nullable{System.Single>
Defined in Type: SkiaBitmapLoader
Namespace: Splat.SkiaSharp
Assembly: Splat.SkiaSharp.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-macos15.0, net9.0-desktop1.0, net9.0-ios18.0, net8.0, net8.0-maccatalyst17.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-macos14.5, netstandard2.1
public Task<IBitmap?> Load(Stream sourceStream, float? desiredWidth, float? desiredHeight)
Inherited documentation
These docs were inherited from IBitmapLoader. The member doesn't override them on this type.
Summary: Loads a bitmap from a byte stream.
Parameters
| Name | Type | Description |
|---|---|---|
sourceStream | Stream | The stream to load the image from. |
desiredWidth | float? | The desired width of the image. |
desiredHeight | float? | The desired height of the image. |
Returns: Task
Remarks
Supplying both dimensions fits the image inside that box without distorting it; supplying one
derives the other from the image's proportions. Only some codecs - JPEG in practice - can decode
straight to a smaller size, so the rest are decoded whole and then resized.