//将两副BMP图象进行异或操作
procedure TForm1.Button3Click(Sender: TObject);
var
Bmp1, Bmp2: TBitmap;
begin
Bmp1 :=TBitmap.Create;
Bmp1.Assign(Image1.Picture.Bitmap);
Bmp2 :=TBitmap.Create;
Bmp2.Assign(Image1.Picture.Bitmap);
BitBlt(Bmp2.Canvas.Handle,0,0,Bmp2.Width,Bmp2.Height,Bmp1.Canvas.Handle,0,0,SRCINVERT);
Image2.Picture.Bitmap.Assign(Bmp1);
Bmp1.Free;
Bmp2.Free;
end;