Partager via


IImagingFactory::CreateNewBitmap

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method creates an in-memory bitmap image object.

Syntax

HRESULT CreateNewBitmap(
  UINT           width,
  UINT           height,
  PixelFormatID  pixelFormat,
  IBitmapImage** bitmap
);

Parameters

  • width
    [in] A UINT value specifying the width of the bitmap in pixels.
  • height
    [in] A UINT value specifying the height of the bitmap in pixels.
  • pixelFormat
    [in] A PixelFormatID value identifying the numerical data format of the pixels in the new bitmap. The following table shows the PixelFormat Values this parameter supports.

    Value Description

    PixelFormat1bppIndexed

    1 bit-per-pixel indexed color bitmap

    PixelFormat4bppIndexed

    4bpp indexed color

    PixelFormat8bppIndexed

    8bpp indexed color

    PixelFormat16bppGrayScale

    16bpp grayscale

    PixelFormat16bppRGB555

    16bpp RGB 5-5-5 (blue in low-order bits)

    PixelFormat16bppRGB565

    16bpp RGB 5-6-5

    PixelFormat16bppARGB1555

    16bpp ARGB 1-5-5-5

    PixelFormat24bppRGB

    24bpp RGB (blue in low-order byte)

    PixelFormat32bppRGB

    32bpp RGB (high order byte unused)

    PixelFormat32bppARGB

    32bpp ARGB, non-premultiplied alpha

    PixelFormat32bppPARGB

    32bpp ARGB, premultiplied alpha

    PixelFormat48bppRGB

    48bpp RGB

    PixelFormat64bppARGB

    64bpp ARGB, non-premultiplied alpha

    PixelFormat64bppPARGB

    64bpp ARGB, premultiplied alpha

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

Return Value

If successful, this method returns S_OK.

This method may return E_POINTER if it fails.

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

Reference

IImagingFactory