EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

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.

 

Remarks

The encoder might not support the requested pixel format. If not, SetPixelFormat returns the closest match in the memory block that pPixelFormat points to. If the returned pixel format doesn't match the requested format, you must use an IWICFormatConverter object to convert the pixel data.

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

 

 

Aggiunte alla community

AGGIUNGI
Mostra:
© 2014 Microsoft