Export (0) Print
Expand All

Image.FromFile method

Applies to: desktop apps only

The Image::FromFile method creates an Image object based on a file.

Syntax

static Image* FromFile(
  [in]  const WCHAR *filename,
  [in]  BOOL useEmbeddedColorManagement
);

Parameters

filename [in]

Type: const WCHAR*

Pointer to a wide-character string that specifies the name of the file.

useEmbeddedColorManagement [in]

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 image file. 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:

Type: Image*

This method returns a pointer to the new Image object.

Remarks

You can create Image objects based on files of a variety of types including BMP, GIF, JPEG, PNG, TIFF, and EMF.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Image
Bitmap
Image::Clone
Image::FromStream
Image Constructors
Loading and Displaying Bitmaps
Drawing, Positioning, and Cloning Images

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2015 Microsoft