Vcl.Graphics.GetDIB

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetDIB(Bitmap: HBITMAP; Palette: HPALETTE; var BitmapInfo; var Bits): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall GetDIB(HBITMAP Bitmap, HPALETTE Palette, void *BitmapInfo, void *Bits);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics Vcl.Graphics

Description

Returns the info header and image for a device independent bitmap.

Call GetDIB to convert a device dependent bitmap into a device independent bitmap (DIB). Pass the handle to a device dependent bitmap and a handle to its palette as the Bitmap and Palette parameters. GetDIB fills in the BitmapInfo and Bits parameters with the info header and image of the corresponding DIB. GetDIB returns true if the bitmap was successfully converted into a DIB, false otherwise.

Before calling GetDIB, the memory for the info header and image must be allocated. Call GetDIBSizes to determine the amount of memory that must be allocated for the info header and image.

See Also