Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Ram voll :-( (https://www.delphipraxis.net/116803-ram-voll.html)

XXcD 7. Jul 2008 21:25

Re: Ram voll :-(
 
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;

Luckie 7. Jul 2008 21:28

Re: Ram voll :-(
 
Gibst du die Parameter TargetBitmap und SourceBitmap auch wieder frei, wenn du sie nicht mehr benötigst?


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:53 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz