共用方式為


Imaging.CreateBitmapSourceFromHBitmap 方法

定義

根據所提供之 Unmanaged 點陣圖和調色盤資訊的指標,傳回 Managed BitmapSource

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

參數

bitmap
IntPtr

nativeint

指向 Unmanaged 點陣圖的指標。

palette
IntPtr

nativeint

指向點陣圖之調色盤對應的指標。

sourceRect
Int32Rect

來源影像的大小。

sizeOptions
BitmapSizeOptions

列舉型別的值,指定轉換的處理方式。

傳回

BitmapSource

建立的 BitmapSource

屬性

適用於

另請參閱