Herd Software Development
DaVinci Graphics Library
GrayDib moves data from the specified DIB handle to a new DIB using gray shades.
HDIB FAR PASCAL GrayDIB(
hDIB Handle of a source DIB of 8 or 24 bit color depth.
Note: since the data is moved (not copied) from one handle to the other during the grayscale conversion, data in the original handle cannot be used after execution of this function.
The return value is a handle to the converted, grayscaled DIB. It is NULL if processing was unsuccessful. Data assigned to this handle must be freed by the application using GlobalFree.
TrueColor (24 bit) source DIBs are converted to 8 bit grayscaled DIBs. If the DIB is already at 8 bits of color depth, color palette data will be recalculated to grayscale values.