Vcl.Graphics.TBitmap.FreeImage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure FreeImage;

C++

void __fastcall FreeImage();

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TBitmap

Description

Frees the cached file image stored in memory by the bitmap.

Use FreeImage to reduce the memory requirements of an application when color depth and pixel format are not an issue. Freeing the image releases the memory allocated for the bitmap image when it was originally loaded to disk. Consequently, some of the original pixel format of the bitmap is lost (for example, if you changed its format to a DIB) as well as the color depth of the bitmap.

When a bitmap is loaded into a bitmap object, the bitmap object creates an image of the loaded bitmap in memory. If the bitmap isn't changed, the memory image is used when saving the bitmap, to verify that the bitmap has not lost color depth or changed the pixel format.

Code Examples