Freigeben über


Imaging.CreateBitmapSourceFromHBitmap Methode

Definition

Gibt auf der Grundlage des bereitgestellten Zeigers auf eine nicht verwaltete Bitmap und Paletteninformationen eine verwaltete BitmapSource zurück.

public:
 static System::Windows::Media::Imaging::BitmapSource ^ CreateBitmapSourceFromHBitmap(IntPtr bitmap, IntPtr palette, System::Windows::Int32Rect sourceRect, System::Windows::Media::Imaging::BitmapSizeOptions ^ sizeOptions);
[System.Security.SecurityCritical]
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromHBitmap (IntPtr bitmap, IntPtr palette, System.Windows.Int32Rect sourceRect, System.Windows.Media.Imaging.BitmapSizeOptions sizeOptions);
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromHBitmap (IntPtr bitmap, IntPtr palette, System.Windows.Int32Rect sourceRect, System.Windows.Media.Imaging.BitmapSizeOptions sizeOptions);
[<System.Security.SecurityCritical>]
static member CreateBitmapSourceFromHBitmap : nativeint * nativeint * System.Windows.Int32Rect * System.Windows.Media.Imaging.BitmapSizeOptions -> System.Windows.Media.Imaging.BitmapSource
static member CreateBitmapSourceFromHBitmap : nativeint * nativeint * System.Windows.Int32Rect * System.Windows.Media.Imaging.BitmapSizeOptions -> System.Windows.Media.Imaging.BitmapSource
Public Shared Function CreateBitmapSourceFromHBitmap (bitmap As IntPtr, palette As IntPtr, sourceRect As Int32Rect, sizeOptions As BitmapSizeOptions) As BitmapSource

Parameter

bitmap
IntPtr

nativeint

Ein Zeiger auf die nicht verwaltete Bitmap.

palette
IntPtr

nativeint

Ein Zeiger auf die Palettenzuordnung der Bitmap.

sourceRect
Int32Rect

Die Größe des Quellbilds.

sizeOptions
BitmapSizeOptions

Ein Wert der Enumeration, mit dem angegeben wird, wie Konvertierungen behandelt werden.

Gibt zurück

Der erstellte BitmapSource.

Attribute

Gilt für:

Weitere Informationen