ColorizeGray Example for C++ 5.0 and later
ILEADRaster* m_pRasterSrc= NULL;
CoCreateInstance(CLSID_LEADRaster, NULL, CLSCTX_ALL, IID_ILEADRaster, (void**)&m_pRasterSrc);
ILEADRasterIO* m_pRasterIO= NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&m_pRasterIO);
ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);
m_pRasterIO->Load(m_pRasterSrc, "c:\\1.bmp", 0, 0, 1);
m_pRasterProc->GrayColorCount = 6;
m_pRasterProc->PutGrayColorThreshold(0,9999);
m_pRasterProc->PutGrayColorRed(0,255);
m_pRasterProc->PutGrayColorGreen(0,0);
m_pRasterProc->PutGrayColorBlue(0,0);
m_pRasterProc->PutGrayColorThreshold(1,19999);
m_pRasterProc->PutGrayColorRed(1,0);
m_pRasterProc->PutGrayColorGreen(1,255);
m_pRasterProc->PutGrayColorBlue(1,0);
m_pRasterProc->PutGrayColorThreshold(2,29999);
m_pRasterProc->PutGrayColorRed(2,0);
m_pRasterProc->PutGrayColorGreen(2,0);
m_pRasterProc->PutGrayColorBlue(2,255);
m_pRasterProc->PutGrayColorThreshold(3,39999);
m_pRasterProc->PutGrayColorRed(3,0);
m_pRasterProc->PutGrayColorGreen(3,255);
m_pRasterProc->PutGrayColorBlue(3,255);
m_pRasterProc->PutGrayColorThreshold(4,49999);
m_pRasterProc->PutGrayColorRed(4,255);
m_pRasterProc->PutGrayColorGreen(4,0);
m_pRasterProc->PutGrayColorBlue(4,255);
m_pRasterProc->PutGrayColorThreshold(5,59999);
m_pRasterProc->PutGrayColorRed(5,255);
m_pRasterProc->PutGrayColorGreen(5,255);
m_pRasterProc->PutGrayColorBlue(5,0);
m_pRasterProc->ColorizeGray(m_LeadRasterView.GetRaster (), m_pRasterSrc);
m_pRasterSrc->Release();
m_pRasterIO->Release();
m_pRasterProc->Release();