RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Graphics.GetDIB Function

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

Pascal
function GetDIB(Bitmap: HBITMAP; Palette: HPALETTE; var BitmapInfo; var Bits): Boolean;
C++
Boolean GetDIB(HBITMAP Bitmap, HPALETTE Palette,  BitmapInfo,  Bits);

Graphics

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!