IWICFormatConverterInfo::GetPixelFormats method (wincodec.h)

Retrieves a list of GUIDs that signify which pixel formats the converter supports.


HRESULT GetPixelFormats(
  [in]      UINT               cFormats,
  [in, out] WICPixelFormatGUID *pPixelFormatGUIDs,
  [out]     UINT               *pcActual


[in] cFormats

Type: UINT

The size of the pPixelFormatGUIDs array.

[in, out] pPixelFormatGUIDs

Type: WICPixelFormatGUID*

Pointer to a GUID array that receives the pixel formats the converter supports.

[out] pcActual

Type: UINT*

The actual array size needed to retrieve all pixel formats supported by the converter.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


The format converter does not necessarily guarantee symmetricality with respect to conversion; that is, a converter may be able to convert FROM a particular format without actually being able to convert TO a particular format. In order to test symmetricality, use CanConvert.

To determine the number of pixel formats a converter can handle, set cFormats to 0 and pPixelFormatGUIDs to NULL. The converter will fill pcActual with the number of formats supported by that converter.


Minimum supported client Windows XP with SP2, Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header wincodec.h
Library Windowscodecs.lib
DLL Windowscodecs.dll