Export (0) Print
Expand All

Imaging.CreateBitmapSourceFromHBitmap Method

Returns a managed BitmapSource, based on the provided pointer to an unmanaged bitmap and palette information.

Namespace:  System.Windows.Interop
Assembly:  PresentationCore (in PresentationCore.dll)

public static BitmapSource CreateBitmapSourceFromHBitmap(
	IntPtr bitmap,
	IntPtr palette,
	Int32Rect sourceRect,
	BitmapSizeOptions sizeOptions
)

Parameters

bitmap
Type: System.IntPtr

A pointer to the unmanaged bitmap.

palette
Type: System.IntPtr

A pointer to the bitmap's palette map.

sourceRect
Type: System.Windows.Int32Rect

The size of the source image.

sizeOptions
Type: System.Windows.Media.Imaging.BitmapSizeOptions

A value of the enumeration that specifies how to handle conversions.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft