Image2.Transparent := True;
FImage1 := TMultiImage.Create;
FBitmap1 := TImagingBitmap.Create;
Image1.Picture.Graphic := FBitmap1;
FImage1.LoadMultiFromFile('e:\Tigers.jpg'); // my background image
Image1.Picture.Graphic.Assign(FImage1);
FImage2 := TMultiImage.Create;
FBitmap2 := TImagingBitmap.Create;
FBitmap2.Width:=449;
FBitmap2.Height:=303;
Image2.Picture.Graphic := FBitmap2;
FImage2.LoadMultiFromFile('e:\black.bmp'); // my foreground image, a black bitmap of same dimension of background image
Image2.Picture.Graphic.Assign(FImage2);
Image2.Canvas.Brush.Color := clBlack;
Image2.Canvas.FillRect(Image2.ClientRect);
Image2.Canvas.Pen.Color := clWhite;
Image2.Canvas.Line(0, 0, 200, 200);
Image2.Canvas.Brush.Color := clBlack;
Image2.Canvas.FillRect(Image2.ClientRect);
Page created in 0.012 seconds with 19 queries.