IWICBitmapFrameEncode::SetPixelFormat method

Requests that the encoder use the specified pixel format.

Syntax


HRESULT SetPixelFormat(
  [in, out]  WICPixelFormatGUID *pPixelFormat
);

Parameters

pPixelFormat [in, out]

Type: WICPixelFormatGUID*

On input, the requested pixel format GUID. On output, the closest pixel format GUID supported by the encoder; this may be different than the requested format. For a list of pixel format GUIDs, see Native Pixel Formats.

Return value

Type: HRESULT

Possible return values include the following.

Return codeDescription
S_OK

Success.

WINCODEC_ERR_WRONGSTATE

The IWICBitmapFrameEncode::Initialize method was not called.

 

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

DLL

Windowscodecs.dll

See also

IWICBitmapFrameEncode
Native Pixel Formats

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.