DigitalSubtract example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmaps, keeping the bits per pixel of the file }
LEADImage1.Load ('Destination.cmp', 0, 1, 1 );
LEADImage2.Load ('source.cmp', 0, 1, 1 );
LEADImage1.DigitalSubtract (LEADImage2.Bitmap, DS_CONTRASTENH );
// Now we have the resulting image in LiveBmp
end;