Vcl.Graphics.CreateGrayMappedBmp
Delphi
function CreateGrayMappedBmp(Handle: HBITMAP): HBITMAP;
C++
extern DELPHI_PACKAGE HBITMAP __fastcall CreateGrayMappedBmp(HBITMAP Handle);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Graphics.pas Vcl.Graphics.hpp |
Vcl.Graphics | Vcl.Graphics |
Description
Remaps the standard gray colors in a bitmap with the system grays.
Call CreateGrayMappedBmp to create a bitmap that uses the system gray colors (clBtnHightlight, clBtnFace, clBtnShadow and clBtnText) from a bitmap that uses standard gray scale colors (clWhite, clSilver, clGray, and clBlack). This allows an application to dynamically create images that match the user's control panel settings, given a base image.
CreateGrayMappedBmp creates a new bitmap. It does not alter the original bitmap, which has the handle specified by the Handle parameter.
Note: CreateGrayMappedBmp does not work with bitmaps that have more than 256 colors. For bitmaps with more than 256 colors (8bpp), this function returns the original bitmap.