IImageSink::BeginSink
A version of this page is also available for
4/8/2010
This method is used to establish a connection between the image source and the sink.
During the call to this method, the source and the sink negotiate the data transfer parameters of their connection.
Syntax
HRESULT BeginSink(
ImageInfo* imageInfo,
OPTIONAL RECT* subarea
);
Parameters
imageInfo
[in, out] A pointer to an ImageInfo (Imaging API) structure used to pass information about the data connection between the source and the sink.When calling the function, set the values in the structure to describe the image data produced by the source.
When the method returns successfully, this structure contains values describing the resulting negotiated image parameters for the connection between the source and the sink.
subarea
[out] A pointer to a RECT structure.This parameter is used for partial decoding if the image source and sink can support it.
If the image source can support partial image decoding, it should pass a non-NULL subarea parameter. If it does, the image sink must fill in the RECT structure to tell the source which portion of the image to decode.
If the sink does not want a partial image, it fills in the RECT structure to include the entire source image.
Remarks
The following table shows the values returned by IImageSink::BeginSink in the members of imageinfo.
imageInfo Member | Contents |
---|---|
RawDataFormat |
This member contains one of the following:
|
PixelFormatID |
This member contains the pixel format preferred by the sink. This might or might not be the same format as what was requested by the source. The source can supply pixel data in the format requested by the sink, or it can supply pixel data in one of the canonical pixel formats, which all sinks must support. |
Width, Height, Xdpi, Ydpi |
The contents of these members are normally left unchanged by the sink. However, consider the following:
If the sink doesn't want its BeginSink called twice, it should leave the Width and Height values unchanged and also clear the SinkFlagsPartiallyScalable flag. |
TileWidth, TileHeight |
These members contain the tile dimensions preferred by the sink. If the SinkFlagsFullWidth flag is set, TileWidth must be the same as Width, and TileHeight is the preferred band height. Tile size information is used as a hint for potential performance gains. The source is not required to use the exact tile size requested by the sink. |
Flags |
This member contains one or more of the following flags from the SinkFlags enumeration.
SinkFlagsWantProps. The sink can set this flag to indicate to the source that it is interested in getting image metadata properties through a call to IImageSink::PushPropertyItems. |
This method negotiates the parameters for sending image data from an image source to an image sink.
Prior to sending data to the sink, you must call IImageSink::SetPalette.
Return Values
The following table shows the return values for this method.
Value | Description |
---|---|
S_OK |
The method was successful. |
E_NOTIMPL |
The method failed. |
Requirements
Header | imaging.h |
Library | Imaging.lib |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IImageSink
IImageSink::PushRawData
IImageSink::PushPixelData
IImageSink::GetPixelDataBuffer
IImageSink::ReleasePixelDataBuffer
SinkFlags
IImageSink::PushPropertyItems
IImageSink::SetPalette