ColorRes example for C++ Builder

This example checks to see if the bitmap is 8 bits per pixel and converts it if it is not.

   LEADRasterProcess* pRasterProc= NULL;

     CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&pRasterProc);
   if (LEADRasterView1->Raster->BitmapBits != 8)
   {
      Cursor= crHourGlass;
       pRasterProc->ColorRes (LEADRasterView1->Raster, 8, CRP_OPTIMIZEDPALETTE, CRD_FLOYDSTEINDITHERING, 0);
       LEADRasterView1->ForceRepaint ();
       Cursor= crDefault;
   }
   pRasterProc-> Release( );