AutoColorLevel example for C++ Builder
void __fastcall TForm1::AutoColorLevel1Click(TObject *Sender)
{
LEVELCOLORINFO Master;
LEVELCOLORINFO Red;
LEVELCOLORINFO Green;
LEVELCOLORINFO Blue;
/* Apply "Auto Leveling" to the bitmap */
LEADImage1->AutoColorLevel( Master, Red, Green, Blue, DEFAULT_BLACK_CLIP, DEFAULT_WHITE_CLIP, AUTO_LEVEL );
ShowMessage ( "Min and Max input values for the blue channel using auto level are " +IntToStr(Blue.uMinInput) + "and " + IntToStr(Blue.uMaxInput) );
}