Truevision defined the TGA file format in 1984 for use with its first videographics products. It was the first truecolor file format widely available. They are still widely used for images with alpha channels. It can store indexed, grayscale, RGB and ARGB images. Targas can be uncompressed or compressed with RLE (run length encoding) algorithm.
Targa File Format SupportFormat | TImageFormat equivalent | Loading | Saving |
---|---|---|---|
8 bit indexed |
ifIndex8
| Yes | Yes |
8 bit grayscale |
ifGray8
| Yes | Yes |
16 bit ARGB |
ifA1R5G5B5
| Yes | Yes |
24 bit RGB |
ifR8G8B8
| Yes | Yes |
32 bit ARGB |
ifA8R8G8B8
| Yes | Yes |
All above but RLE compressed |
-
| Yes | Yes |
8 bit indexed Huffman, Delta, RLE |
ifIndex8
| No | No |
8 bit indexed Huffman, Delta, RLE, 4-pass |
ifIndex8
| No | No |
When working with Targa files you can find useful some options which can be set by SetOption function and their current values can be get by GetOption function. Or you can set them by modifying properties of TTargaFileFormat class.
Options Related to Targa FilesOptionId | Allowed Values | Usage |
---|---|---|
ImagingTargaRLE | 0 (false) or 1 (true) | Indicates whether Targa image will be saved with or without RLE compression (efficient only for images with large areas of the same color). Default value is 0 (false). |