100分求怎么给图片加像框。通俗的说就是加个边框
最好有原代码哦
最好有原代码哦
解决方案 »
- 如何绑架视频采集卡的程序?
- x3 studio
- 是否有高手知道,怎么在程序中区别windows的关机和重启!!!!
- 这里有《Thinking in Patten with Delphi》及程序源代码下载
- DBChart如何显示数据的动态分组?
- 怎样在Delphi7中用ADO方式与Internet网中一个SQL Server服务器连接?
- 简单问题:怎样得到DirectoryListBox1中选择的路径,马上给分!
- 关于关闭线程时出现的错误问题 高分请教高手!!
- 千山一刀重出江湖!感谢站长、斑主和关心我的大侠们!
- 关于DCOM。
- 急!线程问题!
- 学写控件新手请教:。在win2000中,如何自己写程序把win2000程序的标题栏改为winXP程序的标题栏样式呢?能不能说一下思路。有小例让我参
image2用来显示var r: TRect;
begin
r.Left := 0;
r.Top := 0;
r.Right := image1.Width;
r.Bottom := Image1.Height;
Image2.Height := Image1.Height;
Image2.Width := Image1.Width;
Image2.Canvas.Draw(0, 0, image1.Picture.Graphic); Image2.Canvas.Pen.Width := 5;
Image2.Canvas.LineTo(0, r.Right);
Image2.Canvas.LineTo(r.Right, r.Bottom);
Image2.Canvas.LineTo(r.Bottom, r.Top);
Image2.Canvas.LineTo(r.Top, 0);
end;
procedure DrawTransparent(var sBmp: TBitMap; dBmp: TBitMap; PosX, PosY: Integer; TranColor: TColor = -1);
type
PRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..32767] of TRGBTriple;
function GetSLCOlor(pRGB: TRGBTriple): TColor;
begin
Result := RGB(pRGB.rgbtRed, pRGB.rgbtGreen, pRGB.rgbtBlue);
end;
var
b, p: PRGBTripleArray;
x, y: Integer;
BaseColor: TColor;
begin
sBmp.PixelFormat := pf24Bit;
dBmp.PixelFormat := pf24Bit;
p := dBmp.scanline[0]; if TranColor = -1 then
BaseCOlor := GetSLCOlor(p[0])
else
BaseCOlor := TranColor; if (PosY > sBmp.Width) or (PosY > sBmp.Height) then
Exit; for y := 0 to dBmp.Height - 1 do
begin
p := dBmp.scanline[y];
b := sBmp.ScanLine[y + PosY];
for x := 0 to (dBmp.Width - 1) do
begin
if GetSLCOlor(p[x]) <> BaseCOlor then
b[x + PosX] := p[x];
end;
end;end;procedure TForm1.Button1Click(Sender: TObject);
var
bmp:TBitMap;
begin
bmp:=TBitMap.Create ;
bmp.Assign(Image1.Picture);
DrawTransparent(bmp,Image2.Picture.Bitmap ,10,10);
image1.Picture.Assign(bmp);
image1.Refresh ;end;
系统报错
Can not assign a Tpicter to a Tbitmap