Bitmap::FromBITMAPINFO method

The Bitmap::FromBITMAPINFO method creates a Bitmap object based on a BITMAPINFO structure and an array of pixel data.

Syntax

Bitmap * FromBITMAPINFO(
  IN const BITMAPINFO *gdiBitmapInfo,
  IN VOID             *gdiBitmapData
);

Parameters

gdiBitmapInfo

Type: const BITMAPINFO*

Pointer to a GDI BITMAPINFO structure. This structure defines several bitmap attributes, such as size and pixel format. The BITMAPINFO structure is defined in Wingdi.h.

gdiBitmapData

Type: VOID*

Pointer to an array of bytes that contains the pixel data.

Return Value

Type: Type: Bitmap*

This method returns a pointer to the new Bitmap object.

Requirements

   
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See Also

Bitmap

Bitmap Constructors

Image

Images, Bitmaps, and Metafiles

Using Images, Bitmaps, and Metafiles