RawSave example for Delphi
//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.
procedure TForm1.SaveRawData(strFileName: String; uOffset: Cardinal);
var
nRet: Integer;
begin
LEADImage1.SaveLSB:= True;
LEADImage1.SavePad4:= True;
nRet:= LEADImage1.SaveOffset(strFileName, uOffset, FILE_RAW, 0, 0, 0);
if(nRet = SUCCESS)then
ShowMessage('SUCCESS file save: ' + strFileName + ' Size Written: ' + IntToStr(LEADImage1.FileSizeWritten))
else
ShowMessage('FAILED--file save: ' + strFileName);
end;