procedure TForm1.Button2Click(Sender: TObject);
var
b,s:tbitmap;
begin
b:=tBitmap.create;
s:=tBitmap.create;
s.TransparentMode :=tmAuto; //可以自己设置透明色
b.LoadFromFile('c:/windows/forest.bmp'); //大的
s.LoadFromFile('c:/windows/circles.bmp'); //小的
b.canvas.copymode:=cmSrcCopy; //选择合适的
s.PixelFormat:=pf32bit; //避免调色板问题
b.PixelFormat:=pf32bit;
//b.canvas.draw(b.width-s.width,b.height-s.height,s); 另一种做法
b.Canvas.CopyRect (rect(b.width-s.width,b.height-s.height,b.width,b.height),
s.canvas,rect(0,0,s.width,s.height));
Canvas.Draw (0,0,b);
b.savetofile('d:/temp.bmp');
b.free;
s.free;
end;