Registriert seit: 19. Sep 2006
581 Beiträge
Delphi 2007 Professional
|
Re: Ram voll :-(
7. Jul 2008, 22:25
So bin gerade erst nach hause gekommen, aber hier nochmal alles aufgelistet:
Alter Code:
Delphi-Quellcode:
function split(SourceBitmap: TBitmap; width, height, left, top: integer): TBitmap;
var
TargetBitmap: TBitmap;
begin
TargetBitmap:=TBitmap.Create;
TargetBitmap.PixelFormat := pf32Bit;
TargetBitmap.Width := width;
TargetBitmap.Height := height;
TargetBitmap.Canvas.copyrect(Rect(0,0,width,height), SourceBitmap.Canvas, Rect(left,top,left+width,top+height));
Result:=TargetBitmap;
end;
Neuer Code:
Delphi-Quellcode:
procedure split(TargetBitmap, SourceBitmap: TBitmap; width, height, left, top: integer);
begin
TargetBitmap.PixelFormat := pf32Bit;
TargetBitmap.Width := width;
TargetBitmap.Height := height;
TargetBitmap.Canvas.copyrect(Rect(0,0,width,height), SourceBitmap.Canvas, Rect(left,top,left+width,top+height));
end;
|
|
Zitat
|