DigitalSubtract 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->DigitalSubtract(m_LeadRasterView.GetRaster (), m_pRasterSrc, DS_CONTRASTENH);

m_pRasterSrc->Release();
m_pRasterIO->Release();
m_pRasterProc->Release();