Partager via


IImagingFactory::CreateImageFromStream (Windows CE 5.0)

Send Feedback

This method lets an application create a decoded image object from an input stream.

HRESULT CreateImageFromStream(  IStream* stream,  IImage** image);

Parameters

  • stream
    [in] A pointer to an IStream interface that provides the source data stream for the image. The stream does not need to be seekable.
  • image
    [out] A pointer to the resulting IImage interface pointer.

Return Values

If successful, this method returns S_OK.

This method may return E_POINTER if it fails.

Remarks

When the decoded image object is created, it only keeps a reference to the external data source and does not immediately decode the image. The decoded image object takes over ownership of the input stream object and increments its reference count.

The application should release the stream object after the CreateImageFromStream method returns successfully.

Be aware that decoded image objects are read-only. In particular, you cannot modify the image data. However, you can display it onto a destination graphics context or push its data into an image sink. For more information, see IImage.

Requirements

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

See Also

IImagingFactory | IStream | IImage

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.