ImageLoadingServiceExtensions.FromBytes(IImageLoadingService, Byte[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an image from a byte array.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Graphics::IImage ^ FromBytes(Microsoft::Maui::Graphics::IImageLoadingService ^ target, cli::array <System::Byte> ^ bytes);
public static Microsoft.Maui.Graphics.IImage FromBytes(this Microsoft.Maui.Graphics.IImageLoadingService target, byte[] bytes);
static member FromBytes : Microsoft.Maui.Graphics.IImageLoadingService * byte[] -> Microsoft.Maui.Graphics.IImage
<Extension()>
Public Function FromBytes (target As IImageLoadingService, bytes As Byte()) As IImage
Parameters
- target
- IImageLoadingService
The image loading service.
- bytes
- Byte[]
The byte array containing the image data.
Returns
An IImage created from the byte array.
Exceptions
Thrown when bytes
is null.
Thrown when the image data is invalid or cannot be decoded.