Save example for C++ Builder
This example determines whether a bitmap is grayscale, saves it appropriately, loads the new file, and redisplays the bitmap.
Screen->Cursor = crHourGlass;
if(Lead1->IsGrayScale == GRAY_NO)
Lead1->Save("C:\\lead\\IMAGES\\TMP.CMP", FILE_CMP, 24, PQ2, SAVE_OVERWRITE);
else
Lead1->Save("C:\\lead\\IMAGES\\TMP.CMP", FILE_CMP,8, PQ2, SAVE_OVERWRITE);
Lead1->Load("C:\\lead\\IMAGES\\TMP.CMP", 0, 0, 1);
Lead1->ForceRepaint();
Screen->Cursor = crDefault;