Class TBGRACompressableBitmap
Unit
Declaration
type TBGRACompressableBitmap = class(TObject)
Description
Class to compress and store the compressed image.
To use it, create an instance with the bitmap you want to compress. You can then free the original bitmap because TBGRACompressableBitmap
contains all information necessary to build it again. To construct again your bitmap, call the GetBitmap function.
In this implementation, the memory usage grows during the compression process and is lower only after it is finished. So it is recommended to compress one bitmap at a time.
Hierarchy
- TObject
- TBGRACompressableBitmap
Overview
Fields
CompressionLevel: Tcompressionlevel; |
Methods
constructor Create(Source: TBGRABitmap); overload; |
|
constructor Create; overload; |
|
destructor Destroy; override; |
|
function Compress: boolean; |
|
function GetBitmap: TBGRABitmap; |
|
function UsedMemory: Int64; |
|
procedure Assign(Source: TBGRABitmap); |
|
procedure ReadFromStream(AStream: TStream); |
|
procedure WriteToStream(AStream: TStream); |
Properties
property Caption : string read FCaption write FCaption; |
|
property Height: Integer read FHeight; |
|
property Width : Integer read FWidth; |
Description
Fields
CompressionLevel: Tcompressionlevel; |
|
This item has no description. |
Methods
constructor Create(Source: TBGRABitmap); overload; |
|
This item has no description. |
constructor Create; overload; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
function GetBitmap: TBGRABitmap; |
|
Constructs the bitmap again, decompressing if necessary. After this, the image is not compressed anymore so the memoy usage grows again and the access becomes fast because there is no need to decompress anymore. |
function UsedMemory: Int64; |
|
This item has no description. |
procedure Assign(Source: TBGRABitmap); |
|
This item has no description. |
procedure ReadFromStream(AStream: TStream); |
|
This item has no description. |
procedure WriteToStream(AStream: TStream); |
|
This item has no description. |
Properties
property Caption : string read FCaption write FCaption; |
|
This item has no description. |
property Height: Integer read FHeight; |
|
This item has no description. |
property Width : Integer read FWidth; |
|
This item has no description. |