RawSave example for C++ Builder
//This example saves a LEAD TBitmapHandle as RAW data starting at offset uOffset.
//The data is padded so that each line of bytes is evenly divided by 4.
//The bits in each byte are reversed before saving.
//The bits per pixel of the raw data is the same as the bits per pixel of Bitmap property.
//If LEADImage1->Bitmap is a palettized image, the palette is not saved--only the raw data.
void TForm1::SaveRawData(AnsiString strFileName, unsigned uOffset)
{
int nRet;
LEADImage1->SaveLSB= true;
LEADImage1->SavePad4= true;
nRet= LEADImage1->SaveOffset(strFileName, uOffset, FILE_RAW, 0, 0, 0);
if(nRet == SUCCESS)
ShowMessage("SUCCESS file save: " + strFileName + " Size Written: " + IntToStr(LEADImage1->FileSizeWritten));
else
ShowMessage("FAILED--file save: " + strFileName);
}