bu kısımdavar
bmp:tbitmap;
begin
bmp:=tbitmap.create;
try
{
işlemler......
}
finally
bmp.freeimage // ;
bmp.free;
end;
end;
bmp.free ile bmp.freeimage arasındaki fark nedir...?bmp.freeimage // ;
bmp.free;
bu kısımdavar
bmp:tbitmap;
begin
bmp:=tbitmap.create;
try
{
işlemler......
}
finally
bmp.freeimage // ;
bmp.free;
end;
end;
bmp.free ile bmp.freeimage arasındaki fark nedir...?bmp.freeimage // ;
bmp.free;
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
var
BitMap1,BitMap2 : TBitMap;
MyFormat : Word;
begin
BitMap2 := TBitMap.Create;
BitMap1 := TBitMap.Create;
try
BitMap1.LoadFromFile('c:\Program Files\common Files\Borland Shared\Images\Splash\256color\factory.bmp');
BitMap2.Assign(BitMap1); // Copy BitMap1 into BitMap2
BitMap2.Dormant; // Free up GDI resources
BitMap2.FreeImage; // Free up Memory.
Canvas.Draw(20,20,BitMap2); // Note that previous calls don't lose the image
BitMap2.Monochrome := true;
Canvas.Draw(80,80,BitMap2);
BitMap2.ReleaseHandle; // This will actually lose the bitmap;
finally
BitMap1.Free;
BitMap2.Free;
end;
end;