ColorLevel Example for C++ 5.0 and later

ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);

m_pRasterProc->MasterMinInput = 0;
m_pRasterProc->MasterMaxInput = 255;
m_pRasterProc->MasterMinOutput = 255;
m_pRasterProc->MasterMaxOutput = 0;
m_pRasterProc->MasterGamma = DEFAULT_GAMMA;

m_pRasterProc->RedMinInput = 120;
m_pRasterProc->RedMaxInput = 20;
m_pRasterProc->RedMinOutput = 255;
m_pRasterProc->RedMaxOutput = 255;
m_pRasterProc->RedGamma = DEFAULT_GAMMA;

m_pRasterProc->GreenMinInput = 0;
m_pRasterProc->GreenMaxInput = 100;
m_pRasterProc->GreenMinOutput = 200;
m_pRasterProc->GreenMaxOutput = 0;
m_pRasterProc->GreenGamma = DEFAULT_GAMMA;

m_pRasterProc->BlueMinInput = 20;
m_pRasterProc->BlueMaxInput = 200;
m_pRasterProc->BlueMinOutput = 0;
m_pRasterProc->BlueMaxOutput = 255;
m_pRasterProc->BlueGamma = DEFAULT_GAMMA;

m_pRasterProc->ColorLevel(m_LeadRasterView.GetRaster (), LEVEL_BLUE |LEVEL_MASTER);

m_pRasterProc->Release();