IWICFormatConverterInfo::GetPixelFormats method (wincodec.h)

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

Syntax

HRESULT GetPixelFormats(
  UINT               cFormats,
  WICPixelFormatGUID *pPixelFormatGUIDs,
  UINT               *pcActual
);

Parameters

cFormats

Type: UINT

The size of the pPixelFormatGUIDs array.

pPixelFormatGUIDs

Type: WICPixelFormatGUID*

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

pcActual

Type: UINT*

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

Return value

Type: HRESULT

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

Remarks

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 coverter can handle, set cFormats to 0 and pPixelFormatGUIDs to NULL. The converter will fill pcActual with the number of formats supported by that converter.

Requirements

   
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