Compartilhar via


Imaging.CreateBitmapSourceFromHBitmap Método

Definição

Retorna um BitmapSource gerenciado, com base no ponteiro fornecido para obter informações de bitmap e paleta não gerenciadas.

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

Parâmetros

bitmap
IntPtr

nativeint

Um ponteiro para o bitmap não gerenciado.

palette
IntPtr

nativeint

Um ponteiro para o mapa da paleta do bitmap.

sourceRect
Int32Rect

O tamanho da imagem de origem.

sizeOptions
BitmapSizeOptions

Um valor da enumeração que especifica como manipular conversões.

Retornos

BitmapSource

O BitmapSource criado.

Atributos

Aplica-se a

Confira também