IWICBitmapFrameEncode::WritePixels method (wincodec.h)

Copies scan-line data from a caller-supplied buffer to the IWICBitmapFrameEncode object.

Syntax

HRESULT WritePixels(
  [in] UINT lineCount,
  [in] UINT cbStride,
  [in] UINT cbBufferSize,
  [in] BYTE *pbPixels
);

Parameters

[in] lineCount

Type: UINT

The number of lines to encode.

[in] cbStride

Type: UINT

The stride of the image pixels.

[in] cbBufferSize

Type: UINT

The size of the pixel buffer.

[in] pbPixels

Type: BYTE*

A pointer to the pixel buffer.

Return value

Type: HRESULT

Possible return values include the following.

Return code Description
S_OK
Success.
WINCODEC_ERR_CODECTOOMANYSCANLINES
The value of lineCount is larger than the number of scan lines in the image.

Remarks

Successive WritePixels calls are assumed to be sequential scan-line access in the output image.

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
DLL Windowscodecs.dll