Partager via


IImageSink::GetPixelDataBuffer (Windows CE 5.0)

Send Feedback

This method is used by an image source to pass pixel data for an image to the image sink.

Use this method if the source has not yet allocated memory for the image.

A source should only call this method if the negotiated format returned from IImageSink::BeginSink was the image format identifier ImageFormatMemoryBMP. For more information, see Imaging GUIDs.

If the source has the pixel data in memory in the correct pixel format, the source should call IImageSink::PushPixelData to pass a pointer to the pixel data to the sink.

HRESULT GetPixelDataBuffer(  const RECT*   rect,  PixelFormatID pixelFormat,  BOOL          lastPass,  BitmapData*   bitmapData);

Parameters

  • rect
    [in] A pointer to a RECT structure specifying the dimensions of the buffer for the pixel data.

  • pixelFormat
    [in] A PixelFormatID value specifying the data format for the pixels in the buffer.

  • lastPass
    [in] A BOOL value that tells the sink whether this is the last pass over the specified image area.

    Set this value to TRUE if this call to IImageSink::GetPixelDataBuffer is the last pass; otherwise, set to FALSE.

  • bitmapData
    [out] A pointer to a BitmapData object representing the pixel data buffer.

Return Values

If successful, this method returns S_OK.

This method may return E_NOTIMPL if it fails.

Remarks

Your image source must call the IImageSink::GetPixelDataBuffer method to request that the sink allocate memory for the data transfer.

Your image source must fill the buffer with the pixel values and then call IImageSink::ReleasePixelDataBuffer to tell the sink to take the pixel data.

You must call IImageSink::SetPalette prior to sending data to the sink.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Imaging.h.
Link Library: Imaging.lib.

See Also

IImageSink | IImageSink::BeginSink | Imaging GUIDs | IImageSink::PushPixelData | RECT | PixelFormatID | BitmapData | IImageSink::ReleasePixelDataBuffer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.