IImageDecoder::InitDecoder (Compact 2013)

3/26/2014

This feature is being deprecated for this release. Refer to this component: Windows Imaging Component.

This method initializes the image decoder object with an input data stream.

The decoder assumes this input stream is always seekable.

After the decoder object is initialized with a stream, it is associated with that stream until you call the IImageDecoder::TerminateDecoder method.

Syntax

HRESULT InitDecoder(
  IStream* stream,
  DecoderInitFlag flags
);

Parameters

  • stream
    [in] A pointer to the IStream interface that provides the decoder with the input data stream.
  • flags
    [in] One or more DecoderInitFlag enumeration values specifying the initialization parameters for the decoder.

    If you set the DecoderInitFlagNoBlock flag, the decoder is nonblocking. This means that when the decoder runs out of data it returns E_PENDING for the following methods:

    Setting the DecoderInitFlagNoBlock flag has no effect on blocking decoders. Blocking decoders have the ImageCodecFlagsBlockingDecode flag set in the Flags member of ImageCodecInfo.

Return Value

If successful, this method returns S_OK.

This method may return E_FAIL if it fails.

Requirements

Header

imaging.h

Library

Imaging.lib

See Also

Reference

IImageDecoder
IImageDecoder::TerminateDecoder
DecoderInitFlag
IImageDecoder::GetImageInfo
IImageDecoder::GetPropertyItem
ImageCodecInfo

Other Resources

IStream