IImagingFactory::CreateNewBitmap (Compact 2013)

3/26/2014

This feature is being deprecated for this release. Refer to this component: Windows Imaging Component.

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

See Also

Reference

IImagingFactory