IWICBitmapFrameEncode::SetColorContexts method (wincodec.h)

Sets a given number IWICColorContext profiles to the frame.

Syntax

HRESULT SetColorContexts(
  [in] UINT             cCount,
  [in] IWICColorContext **ppIColorContext
);

Parameters

[in] cCount

Type: UINT

The number of IWICColorContext profiles to set.

[in] ppIColorContext

Type: IWICColorContext**

A pointer to an IWICColorContext pointer containing the color contexts profiles to set to the frame.

Return value

Type: HRESULT

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

Remarks

  • BMPSetting color contexts is unsupported. This function will return WINCODEC_ERR_UNSUPPORTEDOPERATION.
  • PNGSetting at most one color context is supported, and additional color contexts will be ignored. This context must be a WICColorContextProfile, and is used to encode the iCCP, gAMA, and cHRM chunks in the PNG file.
  • JPEG, TIFF, JPEG-XRSetting up to one WICColorContextProfile and one WICColorContextExifColorSpace is supported. Users must not provide more than one of each type of color context, as all but the last context of each type will be ignored. In JPEG, the WICColorContextProfile is encoded to JPEG APP2 ICC metadata block.

    In TIFF and JPEG-XR, the WICColorContextProfile is encoded to the IFD ICC profile metadata block (IFD tag 0x8773). In all three formats, the WICColorContextExifColorSpace is encoded to EXIF colorspace metadata block (EXIF tag 0xA001).

Requirements

Requirement Value
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