IWICImagingFactory::CreateEncoder-Methode (wincodec.h)

Erstellt eine neue instance der IWICBitmapEncoder-Klasse.

Syntax

HRESULT CreateEncoder(
  [in]           REFGUID           guidContainerFormat,
  [in, optional] const GUID        *pguidVendor,
  [out, retval]  IWICBitmapEncoder **ppIEncoder
);

Parameter

[in] guidContainerFormat

Typ: REFGUID

Die GUID für das gewünschte Containerformat.

Wert Bedeutung
GUID_ContainerFormatBmp
Die GUID des BMP-Containerformats.
GUID_ContainerFormatPng
Die PNG-Containerformat-GUID.
GUID_ContainerFormatIco
Die GUID des ICO-Containerformats.
GUID_ContainerFormatJpeg
Die JPEG-Containerformat-GUID.
GUID_ContainerFormatTiff
Die TIFF-Containerformat-GUID.
GUID_ContainerFormatGif
Die GIF-Containerformat-GUID.
GUID_ContainerFormatWmp
Die HD Photo-Containerformat-GUID.

[in, optional] pguidVendor

Typ: const GUID*

Die GUID für den bevorzugten Encoderanbieter.

Wert Bedeutung
NULL
Kein bevorzugter Codecanbieter.
GUID_VendorMicrosoft
Verwenden Sie lieber den Microsoft-Encoder.
GUID_VendorMicrosoftBuiltIn
Verwenden Sie lieber den nativen Microsoft-Encoder.

[out, retval] ppIEncoder

Typ: IWICBitmapEncoder**

Ein Zeiger, der einen Zeiger auf einen neuen IWICBitmapEncoder empfängt.

Rückgabewert

Typ: HRESULT

Wenn diese Methode erfolgreich ist, wird S_OK zurückgegeben. Andernfalls wird ein Fehlercode HRESULT zurückgegeben.

Hinweise

Abhängig von den installierten WIC-fähigen Encodern sind möglicherweise andere Werte für guidContainerFormat und pguidVendor verfügbar. Die aufgeführten Werte werden vom Betriebssystem nativ unterstützt.

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows XP mit SP2, Windows Vista [Desktop-Apps | UWP-Apps]
Unterstützte Mindestversion (Server) Windows Server 2008 [Desktop-Apps | UWP-Apps]
Zielplattform Windows
Kopfzeile wincodec.h
Bibliothek Windowscodecs.lib
DLL Windowscodecs.dll

Weitere Informationen

IWICImagingFactory

WIC-GUIDs und CLSIDs