Click or drag to resize

ExtensionsToBitmapImageAsync Method (Byte)

Creates a new instance of BitmapImage and assigns the Byte array to its BitmapImage.StreamSource property

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task<BitmapImage> ToBitmapImageAsync(
	this byte[] bytes
)

Parameters

bytes
Type: SystemByte
The array of bytes that represents the image

Return Value

Type: TaskBitmapImage
A new instance of BitmapImage

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also