Bitmap::FromBITMAPINFO method (gdiplusheaders.h)

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

[in] 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.

[in] gdiBitmapData

Type: VOID*

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

Return value

Type: Bitmap*

This method returns a pointer to the new Bitmap object.

Requirements

Requirement Value
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