Image::FromStream method (gdiplusheaders.h)

The Image::FromStream method creates a new Image object based on a stream.

Syntax

Image * FromStream(
  [in] IStream *stream,
  [in] BOOL    useEmbeddedColorManagement
);

Parameters

[in] stream

Type: IStream*

Pointer to an IStream interface. The implementation of IStream must include the IStream::Seek, Read, and IStream::Stat methods.

[in] useEmbeddedColorManagement

Type: BOOL

Optional. Boolean value that specifies whether the new Image object applies color correction according to color management information that is embedded in the stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information. TRUE specifies that color correction is enabled, and FALSE specifies that color correction is not enabled. The default value is FALSE.

Return value

Type: Image*

This method returns a pointer to the new Image object.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Bitmap

Drawing, Positioning, and Cloning Images

IStream

Image

Image Constructors

Image::Clone

Image::FromFile

Loading and Displaying Bitmaps

StgOpenStorage