SetColorContexts
Collapse the table of content
Expand the table of content

IWICBitmapFrameEncode::SetColorContexts method

Sets a given number IWICColorContext profiles to the frame.

Syntax


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

Parameters

cCount [in]

Type: UINT

The number of IWICColorContext profiles to set.

ppIColorContext [in]

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

  • BMP

    Setting color contexts is unsupported. This function will return WINCODEC_ERR_UNSUPPORTEDOPERATION.

  • PNG

    Setting 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-XR

    Setting 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

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

 

 

Show:
© 2016 Microsoft