Share via


IImagingFactory::CreateImageFromFile (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

HRESULT CreateImageFromFile(
  const WCHAR* filename,
  IImage**     image
);

Parameters

  • filename
    [in] A WCHAR array containing the name of the source file.
  • image
    [out] A pointer to the resulting IImage interface pointer.

Return Value

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 opens the file in read-only mode and allows shared-read access to it.

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

Header imaging.h
Library Imaging.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IImagingFactory
IImage