Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method creates an in-memory bitmap image object from another image object.

Syntax

HRESULT CreateBitmapFromImage(
  IImage*			
image,
  OPTIONAL UINT	
width,
  OPTIONAL UINT	
height,
  OPTIONAL PixelFormatID 
pixelFormat,
  InterpolationHint
hints,
  IBitmapImage**		 
bitmap
);

Parameters

image

[in] A pointer to an IImageinterface containing the original image data.

width

[in] A UINT value that specifies the width, in pixels, of the new bitmap image.

Set this value to 0 create a new bitmap image that is the same height as the source image.

height

[in] A UINT value that specifies the height, in pixels, of the new bitmap image.

Set this value to 0 create a new bitmap image that is the same width as the source image.

pixelFormat

[in] A PixelFormatID value that specifies the numerical format of the pixels in the image. For more information, see PixelFormat Values.

Set this value to PixelFormatDontCare to create a new bitmap image that has the same pixel format as the source image.

hints

[in] An InterpolationHintenumeration value that specifies the interpolation technique that this method should use when resizing the bitmap.

bitmap

[out] A pointer to the resulting IBitmapImageinterface pointer.

Use the interface to access the bitmap image created by this method.

Return Value

If successful, this method returns S_OK.

This method may return E_POINTER if it fails.

Remarks

This method is convenient for converting a bitmap image object of one pixel format into another object of a different pixel format.

Requirements

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

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.