11-03-2013, 09:09 PM
السلام عليكم
هذه محاولة على السريع
الاستعمال
يجدر الذكر أن الصورة لازم تكون من نوع bmp
هذه محاولة على السريع
PHP كود :
function FrameBitmap(srcbmp:TBitmap;const FrameColor:TColor=clBlack;FrameWidth:Integer=0):TBitmap;
var
bmp:TBitmap;
w:integer;
begin
bmp:=TBitmap.Create;
bmp.Width :=srcbmp.Width ;
bmp.Height:=srcbmp.Height ;
bmp.Canvas.Draw(0,0,srcbmp);
bmp.Canvas.Brush.Color:= FrameColor;
bmp.Canvas.Pen.Color:= FrameColor;
if FrameWidth <>0 then
begin
for w := 0 to FrameWidth do
bmp.Canvas.FrameRect(Rect(w,w,bmp.Width-w,bmp.Height-w));
end else
bmp.Canvas.FrameRect
(Rect(0,0,bmp.Width,bmp.Height));
Result:= bmp;
//bmp.Free;
end;
PHP كود :
Self.Image2.Picture.Bitmap:=FrameBitmap(Self.Image1.Picture.Bitmap,clRed,4);
يجدر الذكر أن الصورة لازم تكون من نوع bmp

