IImagingFactory::CreateBitmapFromImage (Windows CE 5.0)

Send Feedback

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

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

Parameters

  • image
    [in] A pointer to an IImage interface 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 InterpolationHint enumeration value that specifies the interpolation technique that this method should use when resizing the bitmap.

  • bitmap
    [out] A pointer to the resulting IBitmapImage interface pointer.

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

Return Values

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

OS Versions: Windows CE 5.0 and later.
Header: Imaging.h.
Link Library: Imaging.

See Also

IImagingFactory | IImage | PixelFormat Values | InterpolationHint | IBitmapImage

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.