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.

if (Lead1->BitmapBits != 8) 
{
    Screen->Cursor  = crHourGlass;
    Lead1->ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
    Lead1->ForceRepaint();
    Screen->Cursor  = crDefault;
}