Truevision Targa File Format

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 Support
FormatTImageFormat equivalentLoadingSaving
8 bit indexed ifIndex8 YesYes
8 bit grayscale ifGray8 YesYes
16 bit ARGB ifA1R5G5B5 YesYes
24 bit RGB ifR8G8B8 YesYes
32 bit ARGB ifA8R8G8B8 YesYes
All above but RLE compressed - YesYes
8 bit indexed Huffman, Delta, RLE ifIndex8 NoNo
8 bit indexed Huffman, Delta, RLE, 4-pass ifIndex8 NoNo
Note: If anyone has some information about two last formats (TGA image type codes 32 and 33) please tell me.

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 Files
OptionIdAllowed ValuesUsage
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).