ID2D1RenderTarget ::CreateBitmapFromWicBitmap(IWICBitmapSource*,ID2D1Bitmap**) méthode (d2d1.h)

Crée un ID2D1Bitmap en copiant la bitmap Microsoft Windows Imaging Component (WIC) spécifiée.

Syntaxe

HRESULT CreateBitmapFromWicBitmap(
        IWICBitmapSource *wicBitmapSource,
  [out] ID2D1Bitmap      **bitmap
);

Paramètres

wicBitmapSource

Type : [in] IWICBitmapSource*

Bitmap WIC à copier.

[out] bitmap

Type : ID2D1Bitmap**

Lorsque cette méthode est retournée, contient un pointeur vers un pointeur vers la nouvelle bitmap. Ce paramètre est passé sans être initialisé.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT .

Remarques

Avant que Direct2D puisse charger une image WIC, elle doit être convertie en un format de pixel et un mode alpha pris en charge. Pour obtenir la liste des formats de pixels et des modes alpha pris en charge, consultez Formats de pixels pris en charge et Modes alpha.

Exemples

Pour obtenir des exemples, consultez Comment charger une bitmap à partir d’un fichier et Comment charger une bitmap à partir d’une ressource.

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 7, Windows Vista avec SP2 et Mise à jour de plateforme pour Windows Vista [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2008 R2, Windows Server 2008 avec SP2 et Platform Update pour Windows Server 2008 [applications de bureau | Applications UWP]
Plateforme cible Windows
En-tête d2d1.h
Bibliothèque D2d1.lib
DLL D2d1.dll

Voir aussi

Guide pratique pour charger une bitmap à partir d’un fichier

ID2D1Bitmap

ID2D1RenderTarget

Formats de pixel et modes alpha pris en charge