ImageEn, unit iexBitmaps

TIEBitmap.ConvertToGray

TIEBitmap.ConvertToGray


Declaration

procedure ConvertToGray();


Description

Converts the selected region to gray levels. The image always will be in true color (16M of colors).

Note: ConvertToGray sets the R,G,B channels to the same value using: RedToGrayCoef, GreenToGrayCoef, BlueToGrayCoef


Example

// Get a toolbar button image from the ImageEn resources
Bitmap.LoadFromResource( HInstance, ITBRES_PROMPTTOSAVE_24 , RT_RCDATA, ioPNG );
if not isEnabled then
  Bitmap.ConvertToGray();