Utility.ConvertBitmapToImageSource Method
Applies to v2.
Converts a Bitmap instance into an ImageSource.
Namespace: Microsoft.WebMatrix.Extensibility
Assembly: Microsoft.WebMatrix.Extensibility (in Microsoft.WebMatrix.Extensibility.dll)
Syntax
'Declaration
Public Shared Function ConvertBitmapToImageSource ( _
bitmap As Bitmap _
) As ImageSource
'Usage
Dim bitmap As Bitmap
Dim returnValue As ImageSource
returnValue = Utility.ConvertBitmapToImageSource(bitmap)
public static ImageSource ConvertBitmapToImageSource(
Bitmap bitmap
)
public:
static ImageSource^ ConvertBitmapToImageSource(
Bitmap^ bitmap
)
static member ConvertBitmapToImageSource :
bitmap:Bitmap -> ImageSource
public static function ConvertBitmapToImageSource(
bitmap : Bitmap
) : ImageSource
Parameters
bitmap
Type: System.Drawing.BitmapThe bitmap instance to convert.
Return Value
Type: System.Windows.Media.ImageSource
The converted bitmap into an image source object.