Image::FromStream Method (Stream^, Boolean, Boolean)
Creates an Image from the specified data stream, optionally using embedded color management information and validating the image data.
Assembly: System.Drawing (in System.Drawing.dll)
public: static Image^ FromStream( Stream^ stream, bool useEmbeddedColorManagement, bool validateImageData )
Parameters
- stream
- Type: System.IO::Stream^
- useEmbeddedColorManagement
-
Type:
System::Boolean
true to use color management information embedded in the data stream; otherwise, false.
- validateImageData
-
Type:
System::Boolean
true to validate the image data; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentException | The stream does not have a valid image format. |
The useEmbeddedColorManagement parameter specifies whether the new Image applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
Note |
|---|
The Image class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel. |
Available since 1.1
