Creates an System.Drawing.Image from the specified file using embedded color management information in that file.
- filename
- A string that contains the name of the file from which to create the System.Drawing.Image.
- useEmbeddedColorManagement
- Set to true to use color management information embedded in the image file; otherwise, false.
The System.Drawing.Image this method creates.
Managed GDI+ has built-in encoders and decoders that support the following file types:
BMP
GIF
JPEG
PNG
TIFF
If the file does not have a valid image format or if ndptecgdiplus does not support the pixel format of the file, this method throws anĀ OutOfMemoryException exception.
The file remains locked until the System.Drawing.Image is disposed.
The useEmbeddedColorManagement parameter specifies whether the new System.Drawing.Image applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
The System.Drawing.Image class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.